nx_rss.nx
buildroot/runtime/nx_rss.nx
about
rss.nx -- RSS 2.0 feed builder.
Emits valid RSS 2.0 XML (specification: Harvard Berkman Center,
2009). Every feed reader, podcast app, news aggregator, and
many static site generators consume RSS. nishi-pages without
RSS is half a blog engine.
Feed skeleton:
<?xml version=\"1.0\" encoding=\"utf-8\"?>
<rss version=\"2.0\">
<channel>
<title>...</title>
<link>...</link>
<description>...</description>
<language>en</language>
<pubDate>Wed, 22 Apr 2026 12:34:56 GMT</pubDate>
<item>
<title>...</title>
<link>...</link>
<description>...</description>
<pubDate>...</pubDate>
<guid>...</guid>
</item>
...
</channel>
</rss>
All dates use IMF-fixdate (http_date.nx). Text content is
HTML-escaped (html_escape.nx) so the feed can contain '<',
'>', '&' safely.
This is a stream-builder: caller walks their posts and calls
rss_item for each; we don't own the post list. All output
appends to a caller-owned buffer with bounds checking.
Invariants:
R1 Order matters: rss_begin -> rss_item* -> rss_end.
R2 Caller supplies HTML-unsafe text; we escape internally.
R3 All dates are unix seconds converted to GMT fixdate.
R4 Description can contain HTML; we wrap it in CDATA rather
dependencies 1 imports · 0 importers
imports: nx_rss_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 53 | const RSS_MAGIC_1777000000: i64 = 1777000000 |
functions
| 55 | func main() -> i64 calls 1: rss_begin |