atom.nx
buildroot/runtime/atom.nx
about
atom.nx -- Atom 1.0 feed builder (RFC 4287).
Modern alternative to RSS 2.0. Atom's strictness (required
id, updated, author; XML namespaces; RFC 3339 dates) makes it
cleaner for programmatic parsing. Google, NetNewsWire, and
many news APIs prefer Atom. Nishi-pages should emit both --
RSS for universal compatibility, Atom for correctness.
Feed skeleton:
<?xml version=\"1.0\" encoding=\"utf-8\"?>
<feed xmlns=\"http://www.w3.org/2005/Atom\">
<title>...</title>
<link href=\"...\"/>
<id>...</id>
<updated>2026-04-22T12:34:56Z</updated>
<author><name>...</name></author>
<entry>
<title>...</title>
<link href=\"...\"/>
<id>...</id>
<updated>...</updated>
<summary>...</summary>
<content type=\"html\"><![CDATA[...]]></content>
</entry>
</feed>
Dates: ISO 8601 (iso8601.nx) -- RFC 3339 is the Atom-specified
subset. HTML content: CDATA wrap, same convention as rss.nx.
Invariants:
A1 id must be a stable tag: URI or URL. Caller supplies;
we emit as-is (escaped).
A2 updated is required at both feed + entry level; we
require it rather than defaulting.
A3 Stream builder: atom_begin -> atom_entry* -> atom_end.
dependencies 3 imports · 0 importers
imports: syscalls.nxhtml_escape.nxiso8601.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
| 41 | const ATOM_ERR_SHORT: i64 = -1 |
functions
| 43 | func atom_put(out: *u8, cap: i64, off: i64, |
| 54 | func atom_put_escaped(out: *u8, cap: i64, off: i64, |
| 62 | func atom_put_iso(out: *u8, cap: i64, off: i64, unix_sec: i64) -> i64 { |
| 69 | func atom_begin(out: *u8, cap: i64, off: i64, |
| 110 | func atom_entry(out: *u8, cap: i64, off: i64, |
| 148 | func atom_end(out: *u8, cap: i64, off: i64) -> i64 { |
| 153 | func main() -> i64 { |