rss2linkwarden.py converts CSV exports from RSS readers to Linkwarden import format, with rich data mapping and reference link extraction.
# Basic conversion
./rss2linkwarden.py input.csv | ./linkwarden_import.py --days -1
# Dry run to preview
./rss2linkwarden.py input.csv | ./linkwarden_import.py --dry-run --days -1| Column | Description | Linkwarden Mapping |
|---|---|---|
id |
Unique identifier | uniqueID |
title |
Link title | name |
note |
Discussion URLs/notes | description + reference extraction |
excerpt |
Content preview | textContent |
url |
Target URL | url |
folder |
Category | collection.name |
tags |
Comma/pipe separated | tags[] |
created |
ISO timestamp | datePublished/dateArrived |
highlights |
Quoted content | description (with > prefix) |
- Scans
notefield line-by-line for URLs and markdown links - Creates separate Linkwarden entries for discussion links
- Platform-specific tags:
re/hn(Hacker News),re/lb(Lobsters),re/rd(Reddit) - Reference descriptions: "from {original_url}"
- Combines
noteandhighlightsfields - Formats highlights as markdown quotes (
> text) - Preserves discussion context and metadata
- Maps CSV
folderto Linkwarden collections dynamically - Creates collections automatically if they don't exist (e.g., "hunt" → hunt collection)
- Discussion links (HN/Lobsters/Reddit) go to "discussions" collection
- Collections cached to avoid repeated API calls
- Default fallback to "rss" collection if folder is empty
CSV Input:
id,title,note,excerpt,url,folder,tags,created
123,Example,https://news.ycombinator.com/item?id=123,Great article,https://example.com,tech,programming,2025-08-28T01:00:00.000ZJSON Output:
{"title": "Example", "url": "https://example.com", "content": "https://news.ycombinator.com/item?id=123", "textContent": "Great article", "tags": "programming", "folder": "tech", ...}
{"title": "https://news.ycombinator.com/item?id=123", "url": "https://news.ycombinator.com/item?id=123", "content": "from https://example.com", "tags": "re/hn", "folder": "references", ...}Linkwarden Result:
- Main link goes to "tech" collection
- Discussion link goes to "discussions" collection
- Collections created automatically if they don't exist
Works seamlessly with existing linkwarden_import.py infrastructure:
- Leverages proven API handling and error recovery
- Maintains idempotency and deduplication features
- Supports all existing import options (--days, --dry-run, etc.)