Skip to main content

Scenerules

@keeb/scenerulesv2026.10.25.1· MIT· 1d agoBEHAVIORS
01README

scenerules.org replicated as a swamp model: the full ruleset catalogue, a mirror of every document and site page, site and local full-text search, rule lookup by number, and the current scene video standards (WEB 2020, x264/x265 rev5, TV-720p/SD 2016) as a release-name parser, validator and formatter

02Release Notes

Initial release: scenerules.org mirror, rule lookup/search, and scene release-name parse/validate/format.

03Behaviors1
@keeb/scenerulesv2026.10.25.1scenerules.ts

Global Arguments

ArgumentTypeDescription
baseUrl?stringscenerules.org base URL
fn catalogue()
Scrape the scenerules.org index into the full ruleset catalogue: id, name, year/version label, era, section or language, key markers (draft, rebuttal, newest revision…), and every rendering URL
fn fetch(rendering?: enum, force?: boolean)
Mirror selected rulesets as decoded text (doc-<id>). Select by ids, era, section/language group, or name.
ArgumentTypeDescription
rendering?enumnfo = the original cp437 document decoded; html/numbered_html = the site's text renderings
force?booleanRewrite documents whose text is unchanged
fn sync(rendering?: enum, pages?: boolean, force?: boolean)
Mirror the entire site: every ruleset in the catalogue plus the standalone pages (nuke rules, key words, sizes, misc, wanted). Unchanged documents are skipped.
ArgumentTypeDescription
rendering?enum
pages?booleanAlso mirror the standalone pages
force?boolean
fn page(page: enum)
Mirror one standalone site page: nuke-rules, mod0, keywords (RFC 2119), sizes, misc, wanted
ArgumentTypeDescription
pageenum
fn search(q: string)
Full-text search through the site's own search.php; returns each matching document with a snippet
ArgumentTypeDescription
qstringSearch terms
fn grep(pattern: string, ignoreCase?: boolean, ids?: array, limit?: number)
Regex search over the local mirror (run fetch/sync first); each hit carries its line and the rule number it falls under
ArgumentTypeDescription
patternstringJavaScript regular expression
ignoreCase?boolean
ids?arrayLimit to these documents
limit?numberMaximum hits
fn rule(document: string, rule: string)
Cite a numbered rule from a document, with all its sub-rules, e.g. document 2020_WDX rule 19.4. Fetches the document if it isn't mirrored yet.
ArgumentTypeDescription
documentstringDocument id, e.g. 2020_WDX
rulestringRule number, e.g. 19.4 or 19.5.7.1
fn parse(names: array, name?: string)
Parse release names or filenames (scene, P2P, fansub) into title, country, year, season/episodes, part, date, episode title, tags, language, resolution, source, format, codec, HDR, audio, service, group, and the standard they fall under, with a confidence
ArgumentTypeDescription
namesarrayRelease names, directory names, or video filenames
name?stringSuffix for the parse-<name> resource
fn validate(names: array, standard?: enum, name?: string)
Check release names against the scene standard they fall under (or the one given); every violation cites the rule it breaks, e.g. '2020_WDX 19.2: consecutive punctuation'
ArgumentTypeDescription
namesarray
standard?enumForce a standard instead of inferring it from the source tag
name?stringSuffix for the validate-<name> resource
fn format(releases: array, standard?: enum, name?: string)
Build compliant directory names from fields (title, numbering, tags, language, resolution, source, codec, group) per the standard the source implies
ArgumentTypeDescription
releasesarray
standard?enum
name?stringSuffix for the format-<name> resource
fn standards()
Write the encoded vocabulary of each implemented standard (2020_WDX, 2020_X265, tvx2642k16, sdtvx2642k16): permitted tags, sources, and the rule number behind each check

Resources

catalogue(infinite)— Every ruleset listed on scenerules.org with its section, label, markers and rendering URLs
document(infinite)— One mirrored ruleset or site page as decoded text (doc-<id>)
sync(infinite)— Summary of a mirror run
search(infinite)— Search hits from the site's search.php or the local mirror
rule(infinite)— A numbered rule (and its sub-rules) from a mirrored document
names(infinite)— Release names parsed, validated, or formatted against the scene video standards
standards(infinite)— The encoded vocabulary (tags, sources, rule numbers) of each implemented standard
04Stats
A
100 / 100
Downloads
3
Archive size
49.6 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Docs keep secrets in a vault1/1earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License2/2earned
  • Verified public repository2/2earned
05Platforms
06Labels