diff options
author | google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> | 2025-05-22 23:41:54 +0000 |
---|---|---|
committer | google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> | 2025-05-22 23:41:54 +0000 |
commit | 7f26740f4c4905cad6b71ea749b83fa5a51c1a0f (patch) | |
tree | 89d40fd313f2b64f262b31690925e5f7aa461a5f /static/login.html | |
parent | fd747e166a1f1a1f22a27e44810836b2bd2244c7 (diff) | |
download | neko-7f26740f4c4905cad6b71ea749b83fa5a51c1a0f.tar.gz neko-7f26740f4c4905cad6b71ea749b83fa5a51c1a0f.tar.bz2 neko-7f26740f4c4905cad6b71ea749b83fa5a51c1a0f.zip |
feat: Add OPML import functionality via CLIopml-import-cli
This change introduces the ability to import feeds from an OPML file
using a command-line interface.
Key features:
- New `--import-opml` (or `-I`) flag in `main.go` to specify the
OPML file path.
- The `importer.ImportOPML` function in `importer/importer.go` handles
the parsing of the OPML file (using `github.com/gilliek/go-opml`)
and addition of new feeds to the database.
- Recursive processing of OPML outlines allows for importing feeds
nested within folders.
- Feeds are identified by their XML URL; existing feeds with the
same URL are skipped to avoid duplicates.
- Title extraction prioritizes the `title` attribute, then the `text`
attribute of an outline, and falls back to "Untitled Feed".
Comprehensive unit tests have been added in `importer/importer_test.go`
to verify:
- Correct parsing and importing of various OPML structures.
- Proper handling of duplicate feeds (skipping).
- Correct title extraction logic.
- Database interaction and cleanup.
Diffstat (limited to 'static/login.html')
0 files changed, 0 insertions, 0 deletions