Reddit to Joplin: Automating Markdown Export and Offline Caching for Saved Posts
How to build a Python CLI pipeline to ingest Reddit GDPR dumps, enrich metadata via the Reddit API, and export categorized Markdown notes into Joplin.
Reddit is one of the richest repositories of niche engineering knowledge: obscure 3D printer slicing profiles, DIY pen plotter designs, custom PCB debugging tricks, and mechanical CAD tips.
However, Reddit’s native saved-post system is practically a black hole:
- No folder hierarchy or categorization.
- Posts and images frequently disappear when authors delete accounts or subreddits go private.
- No full-text offline search.
To preserve and organize technical references, we built Reddit Organize for Joplin, an automated Python CLI tool that ingests your saved and upvoted Reddit history, downloads full-resolution images, and exports them into structured Markdown notebooks ready for Joplin.
1. System Pipeline: From Reddit Dump to Joplin Notebooks
[ Official Reddit GDPR Data Export (.zip / CSV) ]
│
▼
Phase 1: Dump Ingestion (saved_posts.csv, post_votes.csv)
│
▼
Phase 2: Reddit API Enrichment (Full text, Galleries, Author, Flairs)
│
▼
Phase 3: Topic Categorization (Subreddit & Keyword Rule Engine)
│
▼
Phase 4: Asset Downloader (Full-res PNG/JPG into _resources/)
│
▼
[ Joplin Markdown Directory Tree (Ready for Import / Sync) ]
├── 3D Printing/
├── Plotter Design/
├── Electronics & Hardware/
└── 3D Modeling & Art/
2. Ingesting GDPR Dumps vs. Live API Scraping
Reddit allows any user to download their complete account data export (GDPR / California Consumer Privacy Act request) as a .zip file containing CSVs of all saved and upvoted posts.
While this CSV provides permalinks, Reddit’s data export omits post body text and media URLs. Furthermore, scraping Reddit without authentication triggers rate limits and Cloudflare blocking.
The pipeline uses a hybrid approach:
- GDPR CSV as Seed: Reads
saved_posts.csvandpost_votes.csvto collect post IDs without needing expensive API crawling. - Authenticated Script API Enrichment: Uses a free personal Reddit script app (
REDDIT_CLIENT_IDandREDDIT_CLIENT_SECRET) to fetch full submission objects in bulk:
import praw
reddit = praw.Reddit(
client_id=os.getenv("REDDIT_CLIENT_ID"),
client_secret=os.getenv("REDDIT_CLIENT_SECRET"),
user_agent="RedditOrganize/1.0",
)
def enrich_post(post_id):
submission = reddit.submission(id=post_id)
return {
"title": submission.title,
"author": str(submission.author),
"subreddit": submission.subreddit.display_name,
"selftext": submission.selftext,
"score": submission.score,
"created_utc": submission.created_utc,
"media_urls": extract_media_urls(submission),
"permalink": f"https://reddit.com{submission.permalink}"
}
3. Dynamic Topic Categorization Engine
Posts are sorted into targeted technical notebooks based on a configurable YAML rule matrix:
notebooks:
"Electronics & Hardware":
subreddits: ["PrintedCircuitBoard", "AskElectronics", "esp32", "diyelectronics"]
keywords: ["kicad", "altium", "soldering", "schematic", "pcb", "fpga"]
"3D Printing":
subreddits: ["3Dprinting", "BambuLab", "VoronCoreXY", "prusa3d"]
keywords: ["klipper", "extruder", "nozzle", "filament", "input shaping"]
"Plotter Design":
subreddits: ["PlotterArt", "generative"]
keywords: ["pen plotter", "axidraw", "gcode", "stepper", "servo"]
Posts that don’t match strict rules are assigned to an Unsorted notebook, and a discovery analyzer outputs top recurring subreddits so rules can be adjusted.
4. Joplin Markdown Formatting & Local Asset Caching
Joplin organizes notes into folders and stores attachments inside a companion _resources/ directory.
To provide optimal reading ergonomics, the markdown generator formats each note with:
- Hero Media at the Top: In engineering posts, the schematic or 3D photo is the most important element. Images are placed immediately below the main title.
- Metadata Header: Direct link to the original thread, author, score, and tags.
- Local Offline Image Downloader (
--download-images): Downloads all gallery images locally, replacing remote Reddit URLs with Joplin-compatible internal links:
# High Efficiency CoreXY Belt Tensioner Design

> **Source:** [r/VoronCoreXY](https://reddit.com/r/VoronCoreXY/comments/...)
> **Author:** `u/maker_engineer` | **Score:** 482 | **Date:** 2026-04-12
---
Here is a parametric tensioner mod that uses dual 625 bearings...
5. Seamless Joplin Sync
Once the CLI finishes exporting:
python main.py export --download-images --output "C:/Users/hemal/Notes/Reddit_Archive"
In Joplin:
- Click File > Import > MD - Markdown (Directory).
- Select the exported folder.
Joplin instantly builds the notebook tree, imports all images into its local SQLite database, and synchronizes them across desktop, phone, and tablet via your configured WebDAV or Joplin Server.