tracker
All repositories: gitoria
1.6 KB
// tools/count-external-ids.hl — tracker.worldapi.org#12: how many shows (all / followed) have each external id (tmdbId,// imdbId, tvdbId, tvmzId), per `type`. ONLY on a COPY or the stopped app (opening a table rewrites its files):// TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb ./bin/hybriel tools/count-external-ids.hlimport { env } from 'hl:proc'import { showsTable } from '../lib/shows.hl'import { allFollowedShowIds } from '../lib/follows.hl'followed = {}for (id of allFollowedShowIds()) { followed[id] = true }has = (&v) => { return v != null && ('' + v).trim() != '' }counts = {}samples = {}bump = (&key, &show) => {c = counts[key] != null ? counts[key] : { shows = 0 tmdbId = 0 imdbId = 0 tvdbId = 0 tvmzId = 0 }c.shows = c.shows + 1if (has(&show.tmdbId)) { c.tmdbId = c.tmdbId + 1 }if (has(&show.imdbId)) { c.imdbId = c.imdbId + 1 }if (has(&show.tvdbId)) { c.tvdbId = c.tvdbId + 1 }if (has(&show.tvmzId)) { c.tvmzId = c.tvmzId + 1 }counts[key] = creturn null}for (s of showsTable.find(null, null)) {t = s.type != null ? '' + s.type : 'null'bump('all ' + t, &s)if (followed[s.id] == true) { bump('followed ' + t, &s) }if (samples[t] == null) { samples[t] = 'tmdbId=' + s.tmdbId + ' (' + hlTypeName(s.tmdbId) + ') imdbId=' + s.imdbId + ' (' + hlTypeName(s.imdbId) + ') tvdbId=' + s.tvdbId + ' (' + hlTypeName(s.tvdbId) + ') tvmzId=' + s.tvmzId + ' (' + hlTypeName(s.tvmzId) + ')' }}for (k of counts.keys()) {c = counts[k]print(k + ': shows=' + c.shows + ' tmdbId=' + c.tmdbId + ' imdbId=' + c.imdbId + ' tvdbId=' + c.tvdbId + ' tvmzId=' + c.tvmzId)}for (k of samples.keys()) { print('sample ' + k + ': ' + samples[k]) }
Branches
Latest commits
- c6d464e5Log: Apollo GO backlog, AP56 and BS1 startedmre
- 1eb6f1a1Missions AP56, BS1mre
- 4871f8adLog: AP52 live on day52, browser gate greenmre
- d9bf2988Merge ap52: day52, tracker#58 server argument, #51 modal close rule, #56 keyed season rowsmre
- c4a60ef2Log: RT52 retest passed, AP52 startedmre
- 83760a55Browser gate: search results belong to the address form of the typed text (tracker#52 navigate replace)mre
- 6e951d91AP52: show-page rows are keyed records; closing a season is one upsert and removes (tracker#56, hybriel#331)mre
- 3bb4ccddAP52: modal close button refers to its nested rule with Style.buttonModalX (tracker#51, hybriel#333)mre
- ba16933fAP52: login callback and title route are static handlers taking the server as third argument (tracker#58, hybriel#332)mre
- 85153900AP52: re-vendor Hybriel set day52 (source 77cfca31, bin 0a8ed496)mre
- 7c051eddLog: hybriel#338 answermre
- d049b8b8Log: HM50 live, #52 donemre
- 6d05fa37Log: HM50 Part A mergedmre
- 1c7dab74HM50: the shell reads the framework's online state, netProbe removed (tracker#55)mre
- e8b91697HM50: search address follows the text via navigate(path, replace = true) (tracker#52)mre
- 6fe1896cHM50: re-vendor Hybriel set day50 (source 0ae38232, bin d3ef9d16)mre
- 2f391aa9Log: HM50 startedmre
- 4b59c03dHM50 mission: doc pathmre
- ed526d67HM50 missionmre
- 2f986ca3Log: RT50 passmre