Add catalog refresh to self-update monthly torrent hashes#8
Merged
Conversation
The monthly dump hashes were a compiled-in map, so each new month needed a code edit and rebuild. Add `arctic catalog refresh`: it fetches the arctic_shift GitHub releases, pulls each month's comment/submission dump hash from the Academic Torrents link (or magnet), and caches new months to catalog-monthly.json under the data dir. Startup layers that cache over the built-in map, so a running binary resolves dumps published after it was built. The parser only accepts a release that names a month, carries a 40-hex hash, and references that month's RC_/RS_ files, so subreddit-metadata and tooling releases are ignored. A refresh against the live releases reports every current month as already known through 2026-06.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The monthly dump hashes lived in a compiled-in map, so every new month meant a code edit plus a rebuild. This adds
arctic catalog refreshso the CLI keeps itself current.btih), and caches new months tocatalog-monthly.jsonunder the data dir.RC_/RS_dump files, so subreddit-metadata and tooling releases are skipped.--dry-runreports new months without writing the cache.Verified against the live releases: every current month resolves as already known through 2026-06 (the newest published, Jul 12), and every fetched hash matches the compiled catalog exactly. Full suite + vet green.