# Development Python 3.11+ with `websockets` (see `requirements.txt`). `scripts/qa.py` also needs Playwright and is optional. ## Pipeline ``` python scripts/fetch.py # relays -> data/raw/{reports,notes,profiles}.json python scripts/parse.py # -> data/editions.json (sections + structured items) python scripts/build.py # -> dist/ (static site, ~80 files) python scripts/qa.py http://localhost:8765/ # optional: screenshots + overflow/JS-error report (serve dist first) ``` Publishing `dist/` as an nsite: see README.md. ## Sources - Recaps: kind 30023 (and kind 1 before Aug 2025) by Nomishka `2de0ffa0ac235ff45fa4ccb944cd3f33f79ff5d21fcf95f01f99516bb6bb72cc` (`AUTHOR` in `fetch.py`). The relay list is `RELAYS` in `fetch.py`. relay.ditto.pub caps a REQ at 100 events. - Referenced notes: by id from the relays in chunks of 90, then the Primal cache (`cache2.primal.net`) for the rest. - Profiles: Primal cache `user_infos`. ## Parsing Four formats exist: 1. Dec 2024: long-form articles with text headings (`## 🧠 Quote of the Week`). 2. Dec 2024 - Aug 2025 (No. 3-36): **kind-1 notes**, plain text. Section names (and early release names) sit alone between separator lines (`= = =`, `* * *`); `normalize_kind1()` turns them into `##` / `###` markdown first. No. 12, 26 and 38 survive only as one-note-per-section posts on @nostrrecap (`SPLIT_ACCOUNT`); `fetch.py` stitches each week into one pseudo-note (`split: true`), and `dedupe()` keeps it only when no full edition exists for that date. 3. Sep-Oct 2025: `#` section headings with `##` items. 4. Since late 2025: sections separated by `---` / `***`, each titled by a **header picture**, no text. Relays: every relay is paged on its own (`page_back()`); one shared `until` cursor skips events because relay.ditto.pub caps each REQ at 100. For format 4, `data/section_headers.json` maps every header picture URL to a section key (labelled once by looking at the pictures). `NONE` marks an inline picture that follows a separator (merged into the previous section). When `parse.py` prints `UNKNOWN HEADER IMAGES`, an edition used new art: add each URL with its key, otherwise the section falls back to content heuristics (`heuristic_key`). Section keys: quote, news, highlights, growth, education, events, media, zapped, memes, rel-tools, rel-dev, rel-relay, rel-protocol, rel-ai, rel-workspace, rel-infra, rel-exploration, rel-book, support, credits, other. Edition numbers come from the summary/title (digits or ordinal words); missing ones are inferred from the weekly cadence and shown with `*`. ## Looks `assets/style.css` is the default look (Paper). `assets/themes.css` adds Night, Newsprint and Typewriter by overriding the CSS variables on `html[data-theme=...]`. An inline script in `` applies the saved choice (`localStorage["nr-theme"]`, or Night when the OS is dark) before paint; `site.js` shows the four dots in the top bar.