destogod/samples
type-two f293885cd0 Show the spreadsheet column mapping instead of guessing at it
Importing a sheet guessed which column was the controller name and which was
the sign text, then silently acted on the guess. On a sheet whose headers it
did not recognise, the guess fell through to "first column", which is usually
the row number — so the destinations came out named 1, 2, 3.

Now the import opens a preview: the two columns are dropdowns, seeded with the
guess and showing a sample of each, above a table of exactly what will be
created. Nothing is imported until it looks right.

The guessing itself is better too:
  - a top row of words above rows containing numbers is treated as a header
    even when none of its labels are recognised
  - with no recognisable columns, the column carrying the longest words wins
  - one recognised column stands in for the other, since a destination's name
    is usually exactly what the sign shows, rather than picking at random
  - a truncated name no longer keeps a trailing space, which would also stop it
    matching an existing destination on a later import

Also adds custom sign sizes, for boards that are not one of the three fitted
models. Widths snap to a multiple of 8 since the record stores width in bytes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 13:42:27 +10:00
..
desto-test.xlsx DestoGod: replacement for the TP5 bus destination sign software 2026-08-21 13:06:25 +10:00
EXPRESS 1.td5 DestoGod: replacement for the TP5 bus destination sign software 2026-08-21 13:06:25 +10:00
EXPRESS.tp5 DestoGod: replacement for the TP5 bus destination sign software 2026-08-21 13:06:25 +10:00
odd-headers.xlsx Show the spreadsheet column mapping instead of guessing at it 2026-08-21 13:42:27 +10:00
README.md DestoGod: replacement for the TP5 bus destination sign software 2026-08-21 13:06:25 +10:00

Samples

Real files from the operator this was built for, used by the test suite as the reference for "what TP5 actually produces".

  • EXPRESS.tp5 — a TP5 project: the destination list with its text
  • EXPRESS 1.td5 — the same list exported for the bus, made by TP5 itself. This is the file test/roundtrip.mjs rebuilds byte-for-byte.
  • desto-test.xlsx — a small sheet in the layout of the template these buses ship with, for exercising spreadsheet import.

The .td5/.tp5 pair is the ground truth for the whole format. Replacing them with anything else means the round-trip test is no longer checking against a known-good TP5 export.