A bidirectional command-line tool for working with Linkding bookmarks and OPML feeds:
- Export: Fetch bookmarks from Linkding, discover RSS/Atom feeds, and export as OPML
- Import: Convert OPML feeds to HTML bookmarks for importing into Linkding
- π Fetches bookmarks from Linkding API with optional tag filtering
- π‘ Automatically discovers RSS/Atom feeds using standard autodiscovery methods
- π Generates OPML 2.0 compatible files for feed readers
- πΎ Intelligent caching system to avoid repeated network requests
- π₯ Converts OPML feeds to HTML bookmark files
- π Discovers website URLs from RSS/Atom feeds
- π·οΈ Supports adding tags to all imported bookmarks
- π Generates Netscape HTML format compatible with Linkding import
- β‘ Concurrent processing for fast operation (configurable worker pool)
- π‘οΈ Comprehensive error handling and logging
- βοΈ Flexible configuration via YAML files or command-line flags
git clone <repository-url>
cd linkding-to-opml
go build -o linkding-to-opml-
Basic usage with command-line flags:
./linkding-to-opml export \ --linkding-url https://your-linkding-instance.com \ --linkding-token your-api-token -
Using a configuration file:
# Copy the example configuration cp linkding-to-opml.yaml.example linkding-to-opml.yaml # Edit with your settings nano linkding-to-opml.yaml # Run the export ./linkding-to-opml export
-
Convert OPML to HTML bookmarks:
./linkding-to-opml tohtml feeds.opml bookmarks.html
-
Add tags to imported bookmarks:
./linkding-to-opml tohtml --tags "imported,rss" feeds.opml bookmarks.html -
Import the HTML file into Linkding:
- Open your Linkding web interface
- Go to Settings β Import
- Upload the generated
bookmarks.htmlfile - Linkding will import the bookmarks with deduplication
Create a linkding-to-opml.yaml file in your current directory:
# Required: Linkding API settings
linkding:
token: "your-api-token-here"
url: "https://your-linkding-instance.com"
timeout: "30s"
# Optional: Cache settings
cache:
file_path: "./linkding-to-opml.gob"
max_age: 720 # hours (30 days)
# Optional: HTTP client settings
http:
timeout: "30s"
user_agent: "Mozilla/5.0 (compatible; linkding-to-opml/1.0)"
max_redirects: 3
# Optional: Processing settings
output: "feeds.opml"
concurrency: 16
tags: [] # Empty = all bookmarks
# Optional: Logging
verbose: false
debug: false
quiet: falseAll configuration options can be overridden with command-line flags:
# Required
--linkding-token string Linkding API token
--linkding-url string Linkding server URL
# Optional
--tags strings Filter by tags (comma-separated)
--output string Output OPML file path (default: feeds.opml)
--cache string Cache file path
--max-age int Cache max-age in hours (default: 720)
--concurrency int Number of concurrent workers (default: 16)
--config string Configuration file path
# Logging
--verbose Enable verbose logging
--debug Enable debug logging
--quiet Suppress summary output./linkding-to-opml export --linkding-url https://linkding.example.com --linkding-token abc123./linkding-to-opml export --tags "rss,tech" --output tech-feeds.opml./linkding-to-opml export --cache /tmp/my-cache.gob --max-age 168 # 1 week./linkding-to-opml export --verbose./linkding-to-opml export --concurrency 8 # Use 8 workers instead of 16./linkding-to-opml tohtml feeds.opml bookmarks.html./linkding-to-opml tohtml --dry-run feeds.opml bookmarks.html./linkding-to-opml tohtml --tags "imported,feeds" my-feeds.opml import.html./linkding-to-opml tohtml --concurrency 8 feeds.opml bookmarks.html./linkding-to-opml tohtml --verbose feeds.opml bookmarks.htmlThis project is licensed under the MIT License - see the LICENSE file for details.