Skip to main content

Module standard_site

Module standard_site 

Source
Expand description

Reading standard.site publications as feeds.

A publication is not a feed document — it is a record in somebody’s atproto repo, and its “entries” are separate records in the same repo. So this reads two collections rather than fetching one URL:

at://<did>/site.standard.publication/<rkey>
  ├─ resolve <did> → PDS
  ├─ getRecord   site.standard.publication  → name, url
  └─ listRecords site.standard.document     → paged, filtered on `site`

Unauthenticated throughout. This reads someone else’s repo with no session, which is why it cannot reuse crate::oauth::xrpc::Repo: that type takes its base URL from the session’s PDS, hardcodes repo to session.sub, and DPoP-signs every send. None of that survives contact with “read a stranger’s repo”.

Only textContent and description are read; content is ignored. content is an open union — measured across 449 real documents it carried six different wrappers and twenty-two block types from five vendor namespaces, growing with every platform that adopts the lexicon, and it would drag an HTML-sanitisation surface over foreign input. A document with neither field still yields an entry: title, date and a link is what an RSS reader shows for a title-only feed, and is not a failure state.

Structs§

AtUri
A parsed at:// URI: at://<authority>/<collection>/<rkey>.
Entry
One document, mapped onto the shape the feed pipeline already stores.
Publication
The publication record — a pointer, not a feed. Supplies the title and the base URL that document paths are joined onto.

Functions§

entries_from_records
Map a repo’s document records onto entries, keeping only those belonging to canonical_site.
fetch
Read a publication and its documents through the hardened anonymous client.
publication_from_records
Find the publication named by rkey among a repo’s publication records.