gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit05448a9805448a98Merge cb69-imports: appTitle in a dependency-free topicmre05448a98/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

  • 05448a98Merge cb69-imports: appTitle in a dependency-free topicmre
  • e55b379dKeep shared app title independent of the route import graphmre
  • 9a99659blog: hybriel#334, batch waits for day48mre
  • 85fa6c9blog: CB68 result, CB69 startedmre
  • 2f07c1b7log: DP68 boot gate failed, CB68mre
  • 9652782dlog: HM59 merged, DP68 startedmre
  • 29867a75Merge hm59-logic: tracker#59 page logic moved to libmre
  • f7bfe90bMove remaining page builders into their topicsmre
  • 7c3991f9log: day46 from Antonmre
  • ec54fc35Move show page logic into the shows topicmre
  • c1a8d074log: correct timesmre
  • 5827eba9log: HM57 merged, HM59 startedmre
  • d1a91be9Merge hm57-let: tracker#57 let only for reassigned namesmre
  • a404ed75Report HM57 audit, gates and integration notesmre
  • 1dcb87a7Use plain declarations for unchanged bindingsmre
  • b90395e3log: HM51 mergedmre
  • 9888d076Merge hm51-classes: tracker#51 views use Style referencesmre
  • 4399bc2fReference remaining component-owned root Style rulesmre
  • 9edcc2dflog: #58 live, HM57 startedmre
  • 73fa20ddMerge hm49b-styles: tracker#49 rest of the component stylesmre