Export document with all content from one topic?

I’m looking for a way – setting, plugin, external script, anything – to get all posts from one topic into a single document (markdown, pdf, html, anything is fine). Are there any options available?

Even if it lost some formatting and images this would still be useful to me.

Maybe that topic has an optiin that is useful for you

4 Likes

Thank you. I did a couple searches but didn’t find that.

Is there any query string parameter like per_page that I can use? I tried that and it didn’t work, but maybe it’s spelled differently.

“Page” size is fixed at 1000. But you can control how many you want in the OS print UI.

Requesting the next page is possible,

For the /raw/topic-id urls which give markdown formatting, page size is 100, which is a bit short for me. If I could somehow increase that to 1000 it’d be great. My forum has a fair amount of topics with over 100 posts but none over 1000.

You can request 10 pages in a topic using a script like

wget https://meta.discourse.org/raw/TOPIC_ID\?page\={1..10}

2 Likes

Thanks. For anyone else who wants to do this, here is an example set of commands that worked for me:

mkdir md-dl; cd md-dl

wget https://discuss.criticalfallibilism.com/raw/464\?page\={1..3}

cat 464* > combined.md

Downloading extra pages is OK; they just end up blank. But I think the pages will end up out of order if there are more than 9 because, in alphabetical order, 10 comes before 2.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.