Commit graph

10 commits

Author SHA1 Message Date
39e1e1043b Merge pull request 'Login button, sorted and de-duplicated pages, page-by-page editor with uncertain-word review' (#3) from feat/page-editor into main
Reviewed-on: #3
2026-11-04 17:16:32 +01:00
debf1aa8bc Edit plays page by page, with a review of uncertain words
The editor shows one original page next to its photo, with a page list,
page number and missing toggle, and highlights {uncertain} words. The
review dialog steps through them with the photo zoomed to about the
right line. Pages can be re-read from their photo or added from a new
photo, which fills a !N missing marker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gVRDXpoukzgMFumoJt
2026-11-04 16:15:27 +00:00
6240907809 Login button with show-password, skip identical photos on upload
A Přihlásit/Odhlásit button in the top bar replaces logging in via
Přidat hru. The dialog has an eye toggle, says when it is checking,
and keeps the remember box as it was after a wrong password; nothing is
stored until the server accepts it. A remembered password that no
longer works is dropped on load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gVRDXpoukzgMFumoJt
2026-11-04 16:15:27 +00:00
ab842a1d73 Sort pages by their number, drop repeated photos, mark uncertain words
The model now wraps words it isn't sure of in {word} or {word|other}; the
reader shows the first reading. Pages are ordered by the number on each
photo and a page photographed twice is kept once (fewer uncertain words,
then more text). meta.photos records which photo goes with which page.
New POST /images/:n/transcribe re-reads a single photo for the editor.
Seeded plays get an img/ folder on their first photo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gVRDXpoukzgMFumoJt
2026-11-04 16:15:27 +00:00
3f2cf95f1d Merge pull request 'Add plays from photos (OpenRouter or Claude), library, editor, compose; full-page PDF' (#2) from feat/library-uploads into main
Reviewed-on: #2
2026-11-04 16:39:45 +01:00
f353c14619 Transcribe through OpenRouter when OPENROUTER_API_KEY is set
A Claude subscription can't be used by the app, so let it use any cheap
vision model on OpenRouter instead (default google/gemini-3.1-flash-lite,
OPENROUTER_MODEL to change). The Anthropic API stays available as the
second choice. Both providers share the prompt and live behind one
{ name, model, transcribe } interface in server/providers.mjs; OpenRouter
retries 408/429/5xx and network errors and turns 401/402/404 into
messages the editor can show.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gVRDXpoukzgMFumoJt
2026-11-04 15:38:24 +00:00
46aa1236ed Let people add plays from photos; library, editor, compose; full-page PDF
- Replace the static nginx site with a small Node server: serves public/,
  stores plays on a /data volume and exposes a JSON API. Writes need a
  shared UPLOAD_PASSWORD; unpublished plays are hidden without it.
- Page photos (shrunk to <=1.15 MP JPEG in the browser) are transcribed
  one request per page by a Claude vision model (claude-haiku-5-5 by
  default, CLAUDE_MODEL to change) into the play markup, then stitched
  together: speaker spellings unified, gaps in page numbers marked as
  missing pages, failed pages flagged. DAILY_PAGE_LIMIT caps spend.
- New pages: library (play menu), add (upload + progress), editor (text
  next to the photos, checks for [?] readings and one-off names, publish,
  delete). The reader loads plays from the API and remembers the chosen
  role per play; old /?postava= links still work.
- PDF export: text now flows across original pages and prints at the
  on-screen size, so A4 sheets are full instead of half empty; page
  numbers in the footer.
- docker-compose.yml + .env.example for one-click deploys; the 1931 play
  moves to seed/ and is copied into an empty volume on first start.
- Tests: parser leniency, transcription assembly, API end to end with a
  stubbed Claude client.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gVRDXpoukzgMFumoJt
2026-11-03 09:43:32 +00:00
d670d923e8 Merge pull request 'Add theater reader web app with the 1931 play' (#1) from feat/reader-app into main
Reviewed-on: #1
2026-11-03 10:27:53 +01:00
2608d10dd2 Add theater reader web app with the 1931 play transcription
Static app (no build step) served by unprivileged nginx in a container:
choose a font, size and theme, pick a character to highlight their lines
and step through them, read in a distraction-free mode, or export a PDF
via the print dialog (one page per original page).

Includes the transcription of typescript pages 5-27 (pages 1-4 and 7
are missing in the original), a parser with node:test tests, and
self-hosted OFL fonts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gVRDXpoukzgMFumoJt
2026-10-29 23:14:19 +00:00
777328c06d Initial commit: README
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gVRDXpoukzgMFumoJt
2026-10-29 23:14:18 +00:00