MyD Live Whiteboard
===================

Put anything on the TVs you already own. This runs on your PC, composes a board
out of your pictures, and serves it to the screens over your own network.

Nothing is uploaded. There is no account.


What you need
-------------
- Windows 10 or 11
- Python 3.10 or newer (https://www.python.org/downloads/, tick
  "Add python.exe to PATH" during the install)
- The TVs on the same network as this PC


First run
---------
Double click Setup.bat.

It creates a private Python environment inside this folder, installs Pillow and
pywebview into it, then starts everything. The first run takes a minute or two
because of the download; every run after that is instant.

After the first time, use Run.bat. Both files can be pinned to the Start menu or
copied to the desktop as shortcuts.


What opens
----------
Two frameless miniature windows, one per screen:

  LG 55 Inch            the landscape board, pushed to an LG TV over DLNA
  Element 32 Portrait   the portrait board, shown in a browser

Each miniature is the real render of that screen. Drag one anywhere to move it.
Move the mouse over one and its title strip and toolbar fade in, then fade away
again after three seconds.


Putting something on a screen
-----------------------------
- Drag an image, a screenshot, or a saved web page onto a miniature window.
- Or drop files into the "board" folder (the landscape screen) or "board-tv"
  folder (the portrait screen).
- Or from a command prompt:

    .venv\Scripts\python.exe whiteboard.py add shot.png
    .venv\Scripts\python.exe whiteboard.py add --to tv shot.png
    .venv\Scripts\python.exe whiteboard.py window "Notepad" --to tv
    .venv\Scripts\python.exe whiteboard.py url https://example.com --to lg


The toolbar
-----------
Along the bottom of each miniature, when the mouse is over it:

  panel icon    cycles the layout: 1, 2, 3, 4, 2x2, 3x2, 4x2 panels
  down arrow    save this page to the stack and clear the screen
  up arrow      bring the last saved page back (the badge counts saved pages)
  cross         list the saved pages, delete any of them

A full screen saves itself when you drop one more file on it, so a layout is
never lost by accident.


Showing the board on the TV
---------------------------
LG:      Photos & Videos  ->  Media Server  ->  the name of this PC.
         The board is the newest item.

Browser: http://<this-pc-ip>:8814/          portrait board
         http://<this-pc-ip>:8814/?s=lg     landscape board
         Find the IP with ipconfig. On a Fire TV or Android TV, open that
         address in the browser and add it to the home screen.


Movies (optional)
-----------------
The same folder includes a small media server, so the TVs can browse films that
sit on this PC:

    .venv\Scripts\python.exe media.py serve --port 8820

Put the files in the "media" folder. On the LG they appear under Media Server;
on anything with a browser, http://<this-pc-ip>:8820/ lists them.


If something looks wrong
------------------------
- Nothing on the TV: the LG must be awake and on the same network. Switch it on
  and the board is pushed again the moment it is found.
- The browser screen is blank: open http://127.0.0.1:8814/ on this PC first. If
  that works, the address you used on the TV is wrong.
- A miniature window is missing: run Run.bat again. It replaces the old pair.
- Port already in use: close the other copy, or start with --port 8815 and use
  that number everywhere.


What it does not do yet
-----------------------
Video, anything outside your local network, and web pages that sit behind a
login (those tiles screenshot the login screen).
