tsh WALLBOARD
=============

A live results board for a TV or monitor in the tournament room. For every
division it shows:

  - the current round, with unreported games highlighted in yellow and
    "N of M reported" in the corner
  - the next round's pairings once they're made
  - live standings (wins, spread, and tsh's estimated rating change) that
    move as each result comes in

The text automatically sizes itself to fill the screen. If everything won't
fit at a readable size, the board splits the divisions across pages and
rotates through them. A very large division gets one page for pairings and
another for standings.

It only READS a data file that tsh writes. It never changes tsh or any
event files. It needs no internet connection and no web server.


SETUP (once per event, about 2 minutes)
-----

1. Make tsh write its data file after every score and every pairing.
   Add these two lines to the event's config.tsh:

     config hook_addscore_flush = 'savejson'
     config hook_autopair = 'savejson'

   If your config already has either of those hooks, don't add a second
   copy. Add ;savejson to the end of the existing one instead, e.g.
     config hook_autopair = 'phonefeed;savejson'

   Then restart tsh (it reads the config only when it starts).

2. In tsh, type   savejson   (short form: json) once. This writes
   tourney.js into the event's html folder.

3. Copy wallboard.html into that same html folder, next to tourney.js.

4. On the display computer, double-click wallboard.html. It opens in your
   web browser (Chrome or Edge recommended). Press F11 for full screen.

If tsh runs on a different computer from the TV, the TV's computer needs to
see the event's html folder, e.g. a shared network folder or a synced
Dropbox/OneDrive folder. Open wallboard.html from there.


WHILE PLAYING
-------------

The board checks for new data every 10 seconds and redraws only when
something has changed. The small box in the bottom-right corner shows when
it last checked. It turns red ("NOT UPDATING") if it can't read the file.

It shows whatever tsh last saved. Scores and automatic pairings update it by
themselves (that's what the two hooks do). After anything that doesn't run
the hooks, type   savejson   (json) in tsh. That includes pairing by hand
with pair, forfeits with forfeitloss (floss), and some corrections.

Keys:   r  check now     space or right arrow  next page     left arrow  back

The "current round" is the earliest round that still has a missing score, so
the board stays on a round until every game in it is reported.


OPTIONS
-------

Add options after the file name in the browser's address bar. Start with ?
and join more than one with &. For example:

  ...wallboard.html?div=A,B&theme=dark

  div=A,B     show only these divisions. With two screens, give one
              div=A,B and the other div=C,D.
  rotate=30   seconds per page when there's more than one page (default 20)
  min=20      smallest text size (in pixels) before the board splits into
              pages. Default: 16 on a 1080p screen. Raise it if people read
              the TV from far away. Lower it to keep everything on one page.
  history=1   also show every earlier round's results (good for short events)
  ratings=0   hide the rating-change column
  numbers=0   hide the player numbers after names (saves width)
  theme=dark  light text on a dark background
  refresh=5   seconds between checks for new data (default 10)
  src=...     where tourney.js is, if it isn't next to wallboard.html

Tip: once the address looks right, bookmark it.


WHAT IT DOESN'T DO
------------------

- Standings are simple: wins (ties count half), then spread. They don't
  apply spread caps, Gibson marks or special ranking rules. tsh's own
  standings reports remain the official ones.
- Columns for boards, "1st/2nd" and repeat matchups appear only when the
  event uses them.
