gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit9c4397c99c4397c9mission HM63mre9c4397c9/tests/peek-shows.hl

2.0 KB

  1. // tests/peek-shows.hl — the gate's look INTO the shows table (tracker.worldapi.org#18): the description fields the page does
  2. // not show all of. Run only while the app is stopped (hl:mpackdb: one process per storage).
  3. //
  4. // TRACKER_STORAGE=<gate mpackdb> TRACKER_PEEK=1001,1003 ./bin/hybriel tests/peek-shows.hl
  5. // → one line per TMDB id (null prints as ''): peek <tmdbId>|<title>|<summary>|<tmdbSummary>|<tvmazeSummary>|<tagline>|<tmdbSync>
  6. // |<migratedTitle>|<migratedSummary>|<migratedGenres count> (mission 070: what the sync keeps of the migration)
  7. // TRACKER_PEEK_EPISODES=1001 → one line per episode of that title: ep <s>x<e>|<title>|<migratedTitle>|<summary>|<migratedSummary>
  8. // TRACKER_CLEAR_TEXTS=1002 first sets summary and tmdbSummary of that title to null (the TVmaze-only case)
  9. import { env } from 'hl:proc'
  10. import { showsTable, episodesTable } from '../lib/shows.hl'
  11. wanted = env('TRACKER_PEEK') != null ? env('TRACKER_PEEK').split(',') : []
  12. clear = env('TRACKER_CLEAR_TEXTS')
  13. for (s of showsTable.find(null, null)) {
  14. if (s.tmdbId != null && clear != null && '' + s.tmdbId == clear && s.type != 'movie') {
  15. let x = s
  16. x.summary = null
  17. x.tmdbSummary = null
  18. showsTable.update(x.id, x)
  19. console.log('cleared ' + clear)
  20. }
  21. }
  22. showsTable.persist()
  23. for (s of showsTable.find(null, null)) {
  24. if (s.tmdbId != null && wanted.includes('' + s.tmdbId)) {
  25. console.log('peek ' + s.tmdbId + '|' + s.title + '|' + s.summary + '|' + s.tmdbSummary + '|' + s.tvmazeSummary + '|' + s.tagline + '|' + s.tmdbSync
  26. + '|' + s.migratedTitle + '|' + s.migratedSummary + '|' + (s.migratedGenres != null ? s.migratedGenres.length : ''))
  27. }
  28. }
  29. epsOf = env('TRACKER_PEEK_EPISODES')
  30. if (epsOf != null) {
  31. for (s of showsTable.find(null, null)) {
  32. if (s.tmdbId != null && '' + s.tmdbId == epsOf) {
  33. for (e of episodesTable.find(null, null)) {
  34. if (e.show == s.id) { console.log('ep ' + e.seasonNumber + 'x' + e.episodeNumber + '|' + e.title + '|' + e.migratedTitle + '|' + e.summary + '|' + e.migratedSummary) }
  35. }
  36. }
  37. }
  38. }

Branches

Latest commits

  • 9c4397c9mission HM63mre
  • 8dfe42c8mission DP62mre
  • e347fef4Merge rv44: tracker#61 #62 on Hybriel day44mre
  • 8274bcf1log: RV44 done, deploy held for the usage windowmre
  • 1ef7a3b1RV44: report day44 gates and migration/restart proofsmre
  • a5f62f6cRV44: re-vendor Hybriel set day44 (source 222edef7, bin 4f0f263e)mre
  • 6159a248Merge branch 'hm62-personindex' into rv44mre
  • a8923d93log: RV44 startedmre
  • cf28cf77mission RV44mre
  • 585782dfLog: tracker#60 Chrome look, STATUS rewrittenmre
  • 147d0172conductor: caramboleyo is the user, not owner/creatorApollo
  • 21dd0cfblog: #60 live measurement, reviewmre
  • 7793cf94HM62b report: person indexes with fixed mpackdbmre
  • b4c8d3a9Document tracker#62 fixed-index migration and GC proofmre
  • 09d66ed5status: #60 livemre
  • 4171672flog: #60 livemre
  • f52862a2log: HM62b startedmre
  • 88fde2c4mission HM62bmre
  • a722e526log: #62 blocked by hybriel#317mre
  • 074a7418log: #62 assigned to Tracker; pending rulemre