Skip to main content

Anilist Chart

@magistr/anilist-chartv2026.07.21.1· 1d agoMODELS
01README

Read-only render layer for the AniList chat statistics site: turns the anilist_metadata and user_scores ClickHouse tables (written by the @anilist/api ingest model) into the six static pages — the «Доска почёта» board, the /anime landing, and the four genre charts (chart, current, fresh, bayes). This is a faithful port of the legacy Python (generate_board.py, generate_landing.py, anilist_chart*.py); every ranking rule, formatter, and award is reproduced from the oracle. The render boundary is strictly read-only — the worst failure is a stale page for a week, fixable by re-run.

Methods render the pages from whatever data is present and publish each page that rendered (fan-out; one failing page never suppresses the rest).

02Release Notes

Merge pull request #60 from umag/feat/anilist-chart-extension

feat(anilist-chart): add @magistr/anilist-chart render+publish extension

03Models1
@magistr/anilist-chartv2026.07.21.1extensions/models/anilist_chart.ts

Global Arguments

ArgumentTypeDescription
clickhouseUrl?stringClickHouse HTTP endpoint for the read-only render user, e.g. https://host:8443.
clickhouseUser?stringRead-only ClickHouse user (sent as the X-ClickHouse-User header).
clickhouseKey?stringPassword for the read-only ClickHouse user (X-ClickHouse-Key header).
clickhouseDatabasestringClickHouse database holding anilist_metadata and user_scores.
userNamesarrayAniList usernames whose scores feed the four genre charts.
topKnumberRows per genre in each chart; also advertised on the /anime landing.
bayesMinVotesnumberBayesian prior weight m (minimum votes for confidence) on the /bayes chart.
penaltyRatenumberPer-season age penalty applied on the /fresh chart.
nodeHost?stringSSH host of the node serving the pages. Required for `publish`.
nodeUserstringSSH user for the serving node.
outputDir?stringAbsolute path of the nginx-served output directory on the node. Required for `publish`.
fn settings()
Echo the resolved render settings from global arguments. Makes no external calls; useful for verifying configuration before a render run.
fn publish()
Write the rendered pages from the renderedPage artifacts onto the serving node over SSH. Each file is written atomically (temp + rename) and one failing page never suppresses the rest, so a broken write never leaves a half-served page.
fn render(topK: number, bayesMinVotes: number)
Render all six pages (seven artifacts) from ClickHouse and publish every one that passes the freshness gate and the publish backstop. One failing page never suppresses the rest; refused/failed pages are reported in the run marker.
ArgumentTypeDescription
topKnumberRows per genre; threaded into BOTH the chart compute and the landing copy.
bayesMinVotesnumberBayesian prior weight m; threaded into the /bayes chart.

Resources

settings(30d)— Resolved render settings (topK, bayes m, penalty rate, user count); no secrets.
renderedPage(45d)— One rendered static artifact (board, landing, a genre chart, or the bayes JSON), keyed by kind.
renderRun(90d)— Per-run summary marker: freshness verdict, published/refused/failed pages, anomalies.
publishRun(90d)— Per-publish marker: which rendered pages were written to the serving node, which failed, which were missing.
04Stats
A
92 / 100
Downloads
0
Archive size
91.6 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive0/1missing
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
05Platforms
06Labels