tracker
All repositories: gitoria
2.5 KB
// tools/count-incomplete.hl — tracker#33 (mission 029): how many titles are still REDUCED. ONLY on a COPY or a stopped app (opening// a table rewrites its files; hl:mpackdb: one process per storage):// TRACKER_STORAGE=$PWD/.scratch/<copy>/storage/mpackdb ./bin/hybriel tools/count-incomplete.hl [--list]// Counts every live (not merged) non-adult title the details repair still has to do (details.hl needsDetails = shows.hl// isIncomplete: TMDB's details never went through this app) — by type and origin (migrated / filmography fill / search import)// and by what its page misses (shows.hl missingParts). Then the COMPLETE titles that still miss a part — TMDB has none (The// Remaining: no poster, no IMDb id). The last line is the answer: `reduced titles: N` (0 after the repair). `--list` also prints// every reduced title (type, slug, missing parts). A title whose adult flag is still unknown (adult backfill: TMDB 404) is// counted too, apart — its completion asks TMDB once more (404 → `detailsCheck`, adult → the flag; never shown either way).import { args } from 'hl:proc'import { allShows, missingParts } from '../lib/shows.hl'import { needsDetails } from '../lib/details.hl'list = args().includes('--list')reduced = {}missing = {}completeMissing = {}let total = 0let n = 0let adult = 0for (s of allShows()) {if (s.mergedInto == null && s.tmdbId != null) {total = total + 1if (s.adult == true) { adult = adult + 1 }parts = missingParts(&s)if (needsDetails(&s)) {n = n + 1origin = s.minimal == true ? 'fill' : (s.oldId != null && ('' + s.oldId).slice(0, 5) == 'tmdb-' ? 'import' : 'migrated')k = s.type + ' ' + origin + (s.adult == null ? ' (adult flag unknown)' : '')reduced[k] = reduced[k] == null ? 1 : reduced[k] + 1for (p of parts) { missing[p] = missing[p] == null ? 1 : missing[p] + 1 }if (parts.length > 0) { missing['any'] = missing['any'] == null ? 1 : missing['any'] + 1 }if (list) { console.log('reduced ' + s.type + ' ' + s.urlSegment + ' ' + parts.join(',')) }} else if (s.adult != true) {for (p of parts) { completeMissing[p] = completeMissing[p] == null ? 1 : completeMissing[p] + 1 }}}}console.log('titles with a TMDB id: ' + total + ' (adult ' + adult + ', never completed)')for (k of reduced.keys()) { console.log(' reduced ' + k + ': ' + reduced[k]) }console.log(' their pages miss: ' + JSON.stringify(missing))console.log('complete titles missing a part (TMDB has none): ' + JSON.stringify(completeMissing))console.log('reduced titles: ' + n)
Branches
Latest commits
- d2e6d26bMerge branch 'records-park55' into mainTracker
- f567f025|||PR records: park #55, no Claude workers ruleTracker
- c21aff6bMerge branch 'records-hm55c' into mainTracker
- 9ba258d3|||PR records: HM55b resultTracker
- 64f2d300Merge branch 'records-hm55b2' into mainTracker
- ae3b80dc|||PR records: HM55b briefTracker
- 7ef3cb3bMerge branch 'records-st55' into mainTracker
- fec2e080|||PR records: STATUS HM55Tracker
- 8e174918Merge branch 'records-hm55b' into mainTracker
- b1ecee57|||PR records: HM55 stateTracker
- 28eab08cMerge branch 'records-hm55' into mainTracker
- d3edaa05|||PR records: HM55 start, PROCEDURES.mdTracker
- 3059f86cMerge branch 'records-design-rule' into mainTracker
- 421a4809|||PR records: his-design rule (Apollo 2026-11-13)Tracker
- d1390692Merge branch 'records-dp75b' into mainTracker
- a4d1a7d2|||PR records: later steps checked, branch auditTracker
- e070e16fMerge branch 'records-dp75' into mainTracker
- 642b4fa8|||PR records: DP75 day62 live, AP62 briefTracker
- bfc4ea4dMerge branch 'ap62' into mainTracker
- 2c95ac46|||PR AP62: re-vendor Hybriel set day62 (source 70341ad2, bin a54f5f08)Tracker