Generate root-level opml.xml listing all channel feeds #11
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When sub2pod processes a parent directory containing multiple channel subdirectories, there is currently no way for a podcast client to discover all feeds at once. An OPML index file at the root level would let users import the entire collection in a single step.
The tool should write an opml.xml file into the parent directory listing each channel's feed URL and title.
Exploration findings
The CLI in
src/sub2pod/cli.pyalready walksparent_dir, collects channel dirs with atvshow.nfo, parses each one withparse_channel_nfo(), discovers episodes, and writesfeed.xml. All the data needed for OPML (channel title + channel dir name for the URL) is available in that loop.Plan of attack
src/sub2pod/opml.py—build_opml_xml(channels, base_url) -> bytesandwrite_opml(parent_dir, channels, base_url) -> Path, usinglxml.etree(no namespace, OPML 2.0). Feed URL per channel:{base_url}/{quote(channel_dir.name)}/feed.xml.src/sub2pod/cli.py— accumulate(channel_info, channel_dir)pairs, then after the loop write or dry-printopml.xml.tests/test_opml.py— TDD (failing tests first): XML structure, percent-encoding, CLI integration (opml.xml created alongside feed.xml files, dry-run prints path without writing).