Subscription lists as OPML 2.0, the format that every podcast app imports and exports.
A subscription list is a map:
{:title "My podcasts"
:date-created #inst "…" ; and the other head elements
:subscriptions [{:text "A show"
:xml-url "https://example.org/feed.xml"
:html-url "https://example.org"
:path ["Tech"]
:category ["Daily" "/News/Denmark"]
:created #inst "…"}]
:includes [{:text "A list"
:url "https://example.org/list.opml"
:path ["News"]}]
:comments [{:text "An audiobook"
:guid "…"}]}
The folders of the OPML become the :path of the subscriptions inside them, and back again. In an outline:
An outline that includes another OPML list becomes one of the :includes, with the :path of its folders. It has the type include, or the type link to a URL that ends in .opml.
An outline with isComment="true" is commented out, and so is all that's inside it. It becomes one of the :comments, with its attributes and the :path of its folders, and never a subscription, even with an xmlUrl. Other apps skip a comment, so it can name a show that they can't fetch, e.g. one of local files.
Subscription lists as OPML 2.0, the format that every podcast app
imports and exports.
A subscription list is a map:
{:title "My podcasts"
:date-created #inst "…" ; and the other head elements
:subscriptions [{:text "A show"
:xml-url "https://example.org/feed.xml"
:html-url "https://example.org"
:path ["Tech"]
:category ["Daily" "/News/Denmark"]
:created #inst "…"}]
:includes [{:text "A list"
:url "https://example.org/list.opml"
:path ["News"]}]
:comments [{:text "An audiobook"
:guid "…"}]}
The folders of the OPML become the :path of the subscriptions inside
them, and back again. In an outline:
- the categories become a vector, which OPML writes as one
comma-separated attribute of tags and slash-delimited paths
- the time it was created becomes an instant, as do the dates of the
head
- any other attribute stays a string
- the episodes inside it, as Overcast's extended export writes them,
become its :episodes, maps of their attributes, e.g.
{:enclosure-url "…" :played "1" :progress "754"}
An outline that includes another OPML list becomes one of the :includes,
with the :path of its folders. It has the type include, or the type link
to a URL that ends in .opml.
An outline with isComment="true" is commented out, and so is all that's
inside it. It becomes one of the :comments, with its attributes and the
:path of its folders, and never a subscription, even with an xmlUrl.
Other apps skip a comment, so it can name a show that they can't fetch,
e.g. one of local files.(emit subscription-list)The OPML 2.0 document of the subscription-list, with the inclusions
and then the comments after the subscriptions of their folder.
OPML separates the categories of an outline with commas, and it can't escape a comma. So a comma in a category goes out as an underscore.
The OPML 2.0 document of the `subscription-list`, with the inclusions and then the comments after the subscriptions of their folder. OPML separates the categories of an outline with commas, and it can't escape a comma. So a comma in a category goes out as an underscore.
(parse s)The subscription list of the OPML document s. It throws when s isn't
XML, or its root element isn't opml.
The subscription list of the OPML document `s`. It throws when `s` isn't XML, or its root element isn't opml.
(try-parse s)(try-parse s {:keys [url] :as opts})Parse the OPML string s with the opts below, and give a map of the
:list, or of the :error when it isn't OPML.
The error is the diagnostic :fetch/malformed with the :reason, for a list
that came from somewhere else, such as a server. The opts give the
:url of the list for the diagnostic. A platform without an XML parser
isn't the fault of the list, so that error is still thrown.
Parse the OPML string `s` with the `opts` below, and give a map of the :list, or of the :error when it isn't OPML. The error is the diagnostic :fetch/malformed with the :reason, for a list that came from somewhere else, such as a server. The `opts` give the :url of the list for the diagnostic. A platform without an XML parser isn't the fault of the list, so that error is still thrown.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |