twobells 0.2.2__tar.gz → 0.2.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. {twobells-0.2.2/src/twobells.egg-info → twobells-0.2.3}/PKG-INFO +1 -1
  2. {twobells-0.2.2 → twobells-0.2.3}/pyproject.toml +1 -1
  3. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/board.js +37 -10
  4. {twobells-0.2.2 → twobells-0.2.3/src/twobells.egg-info}/PKG-INFO +1 -1
  5. {twobells-0.2.2 → twobells-0.2.3}/LICENSE +0 -0
  6. {twobells-0.2.2 → twobells-0.2.3}/README.md +0 -0
  7. {twobells-0.2.2 → twobells-0.2.3}/setup.cfg +0 -0
  8. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/__init__.py +0 -0
  9. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/__main__.py +0 -0
  10. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/__init__.py +0 -0
  11. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/app.py +0 -0
  12. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/displays/__init__.py +0 -0
  13. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/displays/display.py +0 -0
  14. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/displays/screen.py +0 -0
  15. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/displays/waveshare.py +0 -0
  16. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/dotfont.py +0 -0
  17. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/flaps.py +0 -0
  18. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/fonts/Inter-ExtraBold.ttf +0 -0
  19. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/fonts/Inter-Regular.ttf +0 -0
  20. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/fonts/LICENSE +0 -0
  21. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/fonts/SHA256SUMS +0 -0
  22. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/panel.py +0 -0
  23. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/platformclock.py +0 -0
  24. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/positions.py +0 -0
  25. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/render.py +0 -0
  26. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/route.py +0 -0
  27. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/scroll.py +0 -0
  28. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/sign.py +0 -0
  29. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/speaker.py +0 -0
  30. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/splitflap.py +0 -0
  31. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/state.py +0 -0
  32. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/tft.py +0 -0
  33. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/themes.py +0 -0
  34. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/board/view.py +0 -0
  35. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/cli/__init__.py +0 -0
  36. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/cli/common.py +0 -0
  37. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/cli/dev.py +0 -0
  38. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/cli/main.py +0 -0
  39. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/cli/run.py +0 -0
  40. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/cli/serve.py +0 -0
  41. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/cli/setup.py +0 -0
  42. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/cli/timetable.py +0 -0
  43. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/core/__init__.py +0 -0
  44. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/core/announce.py +0 -0
  45. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/core/budget.py +0 -0
  46. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/core/calling.py +0 -0
  47. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/core/errors.py +0 -0
  48. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/core/files.py +0 -0
  49. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/core/model.py +0 -0
  50. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/core/net.py +0 -0
  51. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/core/osgb.py +0 -0
  52. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/core/polling.py +0 -0
  53. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/core/safexml.py +0 -0
  54. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/core/walk.py +0 -0
  55. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/core/words.py +0 -0
  56. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard/__init__.py +0 -0
  57. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard/area.py +0 -0
  58. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard/collector.py +0 -0
  59. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard/config.py +0 -0
  60. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard/enrich.py +0 -0
  61. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard/history.py +0 -0
  62. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard/performance.py +0 -0
  63. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard/repay.py +0 -0
  64. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard/snapshot.py +0 -0
  65. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/alerts.js +0 -0
  66. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/api.js +0 -0
  67. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/app.css +0 -0
  68. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/area.js +0 -0
  69. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/disruptions.js +0 -0
  70. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/dom.js +0 -0
  71. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/extras.js +0 -0
  72. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/flap.js +0 -0
  73. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/fonts/DepartureboardDots.woff2 +0 -0
  74. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/fonts/LICENSE +0 -0
  75. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/fonts/SHA256SUMS +0 -0
  76. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/header.js +0 -0
  77. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/hero.js +0 -0
  78. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/history.js +0 -0
  79. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/icons/apple-touch-icon.png +0 -0
  80. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/icons/icon-192.png +0 -0
  81. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/icons/icon-512.png +0 -0
  82. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/icons/icon.svg +0 -0
  83. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/icons.js +0 -0
  84. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/index.html +0 -0
  85. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/kiosk.js +0 -0
  86. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/live.js +0 -0
  87. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/look.js +0 -0
  88. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/main.js +0 -0
  89. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/manifest.webmanifest +0 -0
  90. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/map.js +0 -0
  91. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/measures.js +0 -0
  92. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/pa.js +0 -0
  93. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/performance.html +0 -0
  94. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/performance.js +0 -0
  95. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/platformclock.js +0 -0
  96. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/sheet.js +0 -0
  97. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/show.js +0 -0
  98. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/strip.js +0 -0
  99. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/theme.js +0 -0
  100. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/time.js +0 -0
  101. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/train.js +0 -0
  102. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/vendor/inter-4.1/InterVariable.woff2 +0 -0
  103. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/vendor/inter-4.1/LICENSE +0 -0
  104. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/vendor/inter-4.1/SHA256SUMS +0 -0
  105. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/vendor/leaflet-1.9.4/LICENSE +0 -0
  106. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/vendor/leaflet-1.9.4/SHA256SUMS +0 -0
  107. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/vendor/leaflet-1.9.4/leaflet-src.esm.js +0 -0
  108. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/vendor/leaflet-1.9.4/leaflet.css +0 -0
  109. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/dashboard_static/weather.js +0 -0
  110. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/data/gb_stations.csv +0 -0
  111. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/data/naptan_area_grid.csv +0 -0
  112. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/emulator/__init__.py +0 -0
  113. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/emulator/emulation.py +0 -0
  114. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/emulator/emulator.html +0 -0
  115. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/emulator/fake.py +0 -0
  116. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/emulator/server.py +0 -0
  117. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/fetch/__init__.py +0 -0
  118. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/fetch/handoff.py +0 -0
  119. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/fetch/service.py +0 -0
  120. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/settings/__init__.py +0 -0
  121. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/settings/config.py +0 -0
  122. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/settings/installs.py +0 -0
  123. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/settings/keyresults.py +0 -0
  124. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/settings/overlay.py +0 -0
  125. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/settings/schema.py +0 -0
  126. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/settings/show.py +0 -0
  127. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/settings/store.py +0 -0
  128. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/setup/__init__.py +0 -0
  129. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/setup/api.py +0 -0
  130. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/setup/discover.py +0 -0
  131. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/setup/keytest.py +0 -0
  132. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/setup/lookups.py +0 -0
  133. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/setup/spool/__init__.py +0 -0
  134. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/setup/spool/checks.py +0 -0
  135. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/setup/spool/folder.py +0 -0
  136. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/setup/spool/runner.py +0 -0
  137. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/setup/spool/worker.py +0 -0
  138. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/sources/__init__.py +0 -0
  139. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/sources/bods.py +0 -0
  140. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/sources/bodsbus.py +0 -0
  141. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/sources/darwin.py +0 -0
  142. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/sources/disruptions.py +0 -0
  143. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/sources/holidays.py +0 -0
  144. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/sources/lastbus.py +0 -0
  145. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/sources/livebus.py +0 -0
  146. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/sources/transportapi.py +0 -0
  147. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/sources/weather.py +0 -0
  148. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/timetable/__init__.py +0 -0
  149. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/timetable/build.py +0 -0
  150. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/timetable/model.py +0 -0
  151. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/timetable/roads.py +0 -0
  152. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/timetable/routesetup.py +0 -0
  153. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/version.py +0 -0
  154. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/web/__init__.py +0 -0
  155. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/web/auth.py +0 -0
  156. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/web/formpages.py +0 -0
  157. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/web/groupform.py +0 -0
  158. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/web/icons.py +0 -0
  159. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/web/keyspage.py +0 -0
  160. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/web/keystate.py +0 -0
  161. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/web/netguard.py +0 -0
  162. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/web/overview.py +0 -0
  163. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/web/places.py +0 -0
  164. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/web/server.py +0 -0
  165. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/web/settings.js +0 -0
  166. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/web/settingsite.py +0 -0
  167. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/web/status.py +0 -0
  168. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/web/web.css +0 -0
  169. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/web/windowrows.py +0 -0
  170. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/wizard_static/api.js +0 -0
  171. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/wizard_static/finish.js +0 -0
  172. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/wizard_static/home.js +0 -0
  173. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/wizard_static/index.html +0 -0
  174. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/wizard_static/keys.js +0 -0
  175. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/wizard_static/maps.js +0 -0
  176. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/wizard_static/presets.js +0 -0
  177. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/wizard_static/roads.js +0 -0
  178. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/wizard_static/say.js +0 -0
  179. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/wizard_static/state.js +0 -0
  180. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/wizard_static/station.js +0 -0
  181. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/wizard_static/steps.js +0 -0
  182. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/wizard_static/stops.js +0 -0
  183. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/wizard_static/views.js +0 -0
  184. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/wizard_static/walk.js +0 -0
  185. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/wizard_static/wizard.css +0 -0
  186. {twobells-0.2.2 → twobells-0.2.3}/src/twobells/wizard_static/wizard.js +0 -0
  187. {twobells-0.2.2 → twobells-0.2.3}/src/twobells.egg-info/SOURCES.txt +0 -0
  188. {twobells-0.2.2 → twobells-0.2.3}/src/twobells.egg-info/dependency_links.txt +0 -0
  189. {twobells-0.2.2 → twobells-0.2.3}/src/twobells.egg-info/entry_points.txt +0 -0
  190. {twobells-0.2.2 → twobells-0.2.3}/src/twobells.egg-info/requires.txt +0 -0
  191. {twobells-0.2.2 → twobells-0.2.3}/src/twobells.egg-info/top_level.txt +0 -0
  192. {twobells-0.2.2 → twobells-0.2.3}/tests/test_deploy.py +0 -0
  193. {twobells-0.2.2 → twobells-0.2.3}/tests/test_docs.py +0 -0
  194. {twobells-0.2.2 → twobells-0.2.3}/tests/test_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: twobells
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Two Bells: know when to leave. Train and bus departures for Great Britain, on an e-paper or HDMI board on a Raspberry Pi and on a web dashboard, installed on a Pi, in Docker or on a desktop
5
5
  Author: Albert Cornelissen
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "twobells"
7
- version = "0.2.2"
7
+ version = "0.2.3"
8
8
  description = "Two Bells: know when to leave. Train and bus departures for Great Britain, on an e-paper or HDMI board on a Raspberry Pi and on a web dashboard, installed on a Pi, in Docker or on a desktop"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -12,6 +12,8 @@
12
12
  // tablet (kiosk.js) there are no controls: 4 rows, the destination as text.
13
13
  // Rows draw their position strips unless the settings turned them off
14
14
  // (applyRowStrips marks <html data-row-strips="off">) or the page is on a wall tablet.
15
+ // A bus known only from the timetable has no strip, and no words until it is
16
+ // near (notTrackedYet).
15
17
  // What the settings leave out (show.js) isn't drawn: where each train and bus
16
18
  // is, the calling-at line, the punctuality note, a reminder's bell, the last buses.
17
19
  // A row's time, destination and status carry a data-flap key, its board,
@@ -30,6 +32,9 @@ export const SHOWN = 5; // rows before "Show later departures"
30
32
  export const KIOSK_ROWS = 4; // rows on a wall tablet, which has no "Show later departures"
31
33
  const MAX_ROWS = 20; // the most the settings allow
32
34
  export const GO_MS = 2 * 60_000; // "Go now" lasts this long past the leaving time (the hero's too)
35
+ // A bus known only from the timetable says "Not tracked yet" from this long
36
+ // before you need to leave for it (notTrackedYet).
37
+ export const NOT_TRACKED_WITHIN_MS = 10 * 60_000;
33
38
 
34
39
  // On time is plain words; only the exceptions get an icon.
35
40
  const ICON = { late: "triangle-alert", cancelled: "x", unknown: "clock" };
@@ -91,10 +96,12 @@ export function arrange(rows, t) {
91
96
  }
92
97
 
93
98
  // What a board looks like at `t`, as a string: when it changes, the board is
94
- // drawn again.
95
- function arrangement(rows, t) {
99
+ // drawn again. A bus row that has come near enough to say "Not tracked yet"
100
+ // changes it too.
101
+ function arrangement(mode, rows, t) {
96
102
  const { shown, missed } = arrange(rows, t);
97
- return `${shown.map((row) => str(row.id)).join(" ")}|${missed ? str(missed.id) : ""}`;
103
+ const key = (row) => `${str(row.id)}${mode === "bus" && notTrackedYet(row, t) ? "?" : ""}`;
104
+ return `${shown.map(key).join(" ")}|${missed ? str(missed.id) : ""}`;
98
105
  }
99
106
 
100
107
  // Per board: the rows last drawn, how they were arranged, and whether the
@@ -173,7 +180,7 @@ function rowAttrs(row, id, later) {
173
180
  // Notes the rows a board is drawn with, so tickBoards() knows when they change.
174
181
  function remember(mode, rows, t) {
175
182
  boards[mode].rows = rows;
176
- boards[mode].drawn = arrangement(rows, t);
183
+ boards[mode].drawn = arrangement(mode, rows, t);
177
184
  }
178
185
 
179
186
  // The board itself: the "Just missed" line, the table, and the button for the
@@ -476,15 +483,35 @@ function dueCell(row, flap) {
476
483
  h("span", { class: "sched", "aria-hidden": "true" }, "sched."), vh(", timetable only"));
477
484
  }
478
485
 
486
+ // Whether a bus known only from the timetable says "Not tracked yet" at `t`
487
+ // (ms): from NOT_TRACKED_WITHIN_MS before you need to leave for it, or before
488
+ // its time when no walk is set, so the line is there while you decide whether
489
+ // to go. Not once it may not be running: that warning says more. Further off
490
+ // it says nothing, as its time and "sched." already say it is the timetable's.
491
+ export function notTrackedYet(row, t) {
492
+ if (row.live === true || row.ghost === true || row.status === "cancelled") return false;
493
+ const at = parseAt(row.leave_at) ?? parseAt(row.scheduled_at);
494
+ return at !== null && at - t <= NOT_TRACKED_WITHIN_MS;
495
+ }
496
+
497
+ // Where the bus is: a live one, or one whose bus is coming in to work it,
498
+ // shows its stops and says where it is; a timetable-only one has no strip
499
+ // and says "Not tracked yet" only when it is near (notTrackedYet).
500
+ function busWhere(row) {
501
+ if (!shows("where")) return null;
502
+ if (row.live !== true) {
503
+ return notTrackedYet(row, now()) ? h("span", { class: ["sub", "where", "untracked"] }, "Not tracked yet") : null;
504
+ }
505
+ const strip = obj(row.strip);
506
+ const where = str(strip?.where);
507
+ return where ? whereLine(where, "bus", strip, num(strip?.bus_at)) : null;
508
+ }
509
+
479
510
  function busRow(row, later, names, alerts, flap) {
480
511
  const id = validId(row.id) ? row.id : null;
481
512
  const scheduled = str(row.scheduled);
482
513
  const line = str(row.line);
483
514
  const destination = str(row.destination);
484
- const strip = obj(row.strip);
485
- // Every bus with stops to draw shows them, live or not: a timetable-only
486
- // one has no bus on its strip and says "No live position".
487
- const where = str(strip?.where);
488
515
  const walk = num(row.walk_min);
489
516
  // The row header is said with every cell, so it is the line and where it
490
517
  // goes, nothing more: "237 to Ashton-under-Lyne Interchange". The rest is
@@ -494,7 +521,7 @@ function busRow(row, later, names, alerts, flap) {
494
521
  h("span", { class: "line", dataset: { flap: flap("line") } }, line), vh(` to ${destination}`)),
495
522
  td("c-dest", null,
496
523
  openButton(id, `the ${scheduled} ${line} to `, destination, flap("destination")),
497
- where && shows("where") ? whereLine(where, "bus", strip, num(strip?.bus_at)) : null,
524
+ busWhere(row),
498
525
  busStatusExtras(row),
499
526
  recordChip(row)),
500
527
  stopCell(stopText(row, names), walk),
@@ -592,5 +619,5 @@ export function tickBoards() {
592
619
  const at = parseAt(el.dataset.dueAt);
593
620
  if (at !== null) flapText(el, dueText(at - t));
594
621
  }
595
- return Object.values(boards).some((board) => board.drawn !== arrangement(board.rows, t));
622
+ return Object.entries(boards).some(([mode, board]) => board.drawn !== arrangement(mode, board.rows, t));
596
623
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: twobells
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Two Bells: know when to leave. Train and bus departures for Great Britain, on an e-paper or HDMI board on a Raspberry Pi and on a web dashboard, installed on a Pi, in Docker or on a desktop
5
5
  Author: Albert Cornelissen
6
6
  License-Expression: MIT
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes