Open
Conversation
Add `blogwatcher import <file>` command to bulk-import blog subscriptions from OPML files (e.g. Feedly, Inoreader exports). The parser handles OPML 1.0/2.0, non-UTF-8 encodings (ISO-8859-1), nested categories, and gracefully skips non-feed outlines (links, directories, plain text). Duplicate blogs are counted and reported rather than causing errors. Co-Authored-By: Claude <noreply@anthropic.com>
Author
|
Tested with examples from https://opml.org/ |
JulienTant
added a commit
to JulienTant/blogwatcher-cli
that referenced
this pull request
Apr 3, 2026
Allow users to import blog subscriptions from OPML files exported by feed readers like Feedly, Inoreader, and NewsBlur. Duplicates are gracefully skipped and reported. Based on upstream PR Hyaxia/blogwatcher#12 by @pastukhov, adapted to our project patterns (context threading, testify, squirrel, etc.). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5 tasks
JulienTant
added a commit
to JulienTant/blogwatcher-cli
that referenced
this pull request
Apr 4, 2026
* Add OPML import command for bulk blog subscriptions Allow users to import blog subscriptions from OPML files exported by feed readers like Feedly, Inoreader, and NewsBlur. Duplicates are gracefully skipped and reported. Based on upstream PR Hyaxia/blogwatcher#12 by @pastukhov, adapted to our project patterns (context threading, testify, squirrel, etc.). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Fall back to site URL when OPML feed title is empty Prevents multiple untitled feeds from colliding on empty name. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
blogwatcher import <file>command to bulk-import blog subscriptions from OPML files (Feedly, Inoreader, NewsBlur, etc.)internal/opmlpackage: parses OPML 1.0/2.0 with support for non-UTF-8 encodings (ISO-8859-1), nested categories, and mixed outline typesImported 44 blogs, skipped 3 duplicatesDetails
The parser extracts
xmlUrl(feed) andhtmlUrl(site) from<outline>elements, recursively traversing categories. Non-feed outlines (type="link", plain text, directories) are ignored.Tested against:
Test plan
go test ./...— all tests passtext, missingxmlUrl, flat subscription lists (OPML 2.0), non-feed outlines (states, directory, category)blogwatcher import feedly-export.opml→ imports blogs, skips duplicatesblogwatcher blogs→ imported blogs listed correctly