# Discourse Archive Tools

**URL:** https://meta.discourse.org/t/discourse-archive-tools/355747
**Category:** Development
**Created:** [March 5, 2025, 2:50am UTC](https://meta.discourse.org/t/discourse-archive-tools/355747 "2025-03-05T02:50:55Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![c0mmando](https://avatars.discourse-cdn.com/v4/letter/c/97f17d/32.png) [@c0mmando](https://meta.discourse.org/u/c0mmando)
#### Post date: [March 5, 2025, 2:50am UTC](https://meta.discourse.org/t/discourse-archive-tools/355747/1 "2025-03-05T02:50:55Z")

</div>

I needed a method to archive my Discourse forum on GitHub, but I found that many of the available scripts were outdated or broken. So, I decided to create some simple scripts that meet my requirements. While they’re not perfect and still have a few minor issues, they serve my current needs since I don’t have much more time to spend on this project.

[https://github.com/c0mmando/discourse-to-markdown-archiver](https://github.com/c0mmando/discourse-to-markdown-archiver)

- Archive new posts as JSON.
- Render topics to Markdown files.
- Support for multiple Discourse sites concurrently (one site at a time).
- Separate metadata tracking per site (last synchronization date and archived post IDs).
- Concurrent rendering of topics using a thread pool for improved performance.
- Exponential backoff for HTTP requests to handle rate limits or transient errors.

[https://github.com/c0mmando/discourse-to-github-archiver](https://github.com/c0mmando/discourse-to-github-archiver)

- **Archive Posts:** Saves each Discourse post in a JSON file, organized by creation date.
- **Concurrent Rendering:** Renders topics concurrently, converting posts from HTML to Markdown.
- **Image Downloading:** Processes HTML to download images and rewrites image URLs to relative paths.
- **Metadata Updating:** Keeps track of archived posts to avoid duplicates.
- **Incremental README Updates:** Updates a `README.md` with a table of contents for easy navigation.

* * *

**Here is an example of Github archived forum:**  
https[://]github[.]com/c0mmando/forum.hackliberty.org

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [March 7, 2025, 2:23am UTC](https://meta.discourse.org/t/discourse-archive-tools/355747/2 "2025-03-07T02:23:15Z")

</div>

> [@c0mmando](#):
>
> **Here is an example of Github archived forum:**  
> https[://]github[.]com/c0mmando/forum.hackliberty.org

Your link example has an extra “[” brackets. Removed them for link below.

https://][github.com/c0mmando/forum.hackliberty.org](http://github.com/c0mmando/forum.hackliberty.org)
