Skip to main content

Module feed

Module feed 

Source
Expand description

Dependency-free RSS / Atom / RDF feed → Markdown rendering.

Feeds are XML, so the generic super::html_to_text renderer flattens them into an unreadable mush (every <title>/<link>/<description> mashed together). This module instead understands feed structure and emits a clean, token-lean item list: a feed title heading followed by one linked entry per item with its date and a short, tag-stripped summary (GH feedback: “add RSS feed support to url_read”).

Supports RSS 2.0 (<item>), Atom (<entry>), and RSS 1.0 / RDF (<item>), including <![CDATA[…]]> payloads and namespaced date fields (dc:date).

Structs§

FeedDoc
A parsed feed ready to hand back through the normal read_web pipeline.

Functions§

looks_like_feed
True when the response is an RSS/Atom/RDF feed, by MIME type or a sniff of the document root. Deliberately stricter than “is XML” so XHTML pages still go to the HTML renderer.
parse
Parse a feed document into a clean Markdown item list.