curated_feed.opml ================= .. py:module:: curated_feed.opml .. autoapi-nested-parse:: OPML subscription-list parsing. Feedly (and most readers) export feeds nested inside folder outlines, so the walk is recursive and records the folder path for each feed. Phase 0 does not use the folder, but later phases weight and quota by source group. Attributes ---------- .. autoapisummary:: curated_feed.opml.FOLDER_SEPARATOR Exceptions ---------- .. autoapisummary:: curated_feed.opml.OpmlError Classes ------- .. autoapisummary:: curated_feed.opml.Feed Functions --------- .. autoapisummary:: curated_feed.opml.parse_opml Module Contents --------------- .. py:data:: FOLDER_SEPARATOR :value: '/' .. py:exception:: OpmlError Bases: :py:obj:`Exception` Raised when the OPML file is missing or cannot be parsed. .. py:class:: Feed A single subscription from the OPML file. .. py:attribute:: title :type: str .. py:attribute:: xml_url :type: str .. py:attribute:: folder :type: str | None :value: None .. py:function:: parse_opml(path: pathlib.Path | str) -> list[Feed] Parse an OPML export into feeds, in document order. Outlines without an `xmlUrl` are treated as folders and recursed into. Feeds appearing more than once (the same `xmlUrl` filed under two folders) are kept once, at their first occurrence.