Add theater reader web app with the 1931 play #1

Merged
reudy merged 1 commit from feat/reader-app into main 2026-11-03 10:27:53 +01:00
Member

What

A web app for reading a play during rehearsals, plus a transcription of the 1931 typescript (pages 5–27):

  • Font choice: typewriter (Courier Prime), Atkinson Hyperlegible, Lexend, Literata or the system font, with adjustable size and light, sepia or dark colours.
  • Character highlighting: the chosen character's lines are marked, and ▲/▼ (or J/K) jump between them. ?postava=Lída links open with the role already chosen.
  • Text form: running text (hyphenation joined, missing spaces after punctuation added) or the original typescript line breaks.
  • Reading mode: settings hidden, with a floating bar for navigation and text size.
  • PDF export goes through the print stylesheet: A4, one page per original page, with the highlighting kept.

Why it's built this way

  • It's a static site with no build step and no backend. The play is a plain-text markup file (documented in AGENTS.md), so adding the missing page 7 later is a text edit.
  • Fonts are self-hosted, so viewers' browsers make no third-party requests. The CSP is default-src 'self'.
  • The container runs unprivileged nginx on 8080. The README publishes it to loopback only (127.0.0.1:3010).
  • The PDF goes through the print dialog rather than a client-side PDF library. The output then matches the screen exactly and needs no extra code; the trade-off is that the user has to choose "Save as PDF".

Tested

  • npm test (node:test, run in a node:22-alpine container): 6 parser tests pass. They cover page order, missing pages, speakers carried across page breaks, verse vs. stage directions, hyphen joining and spacing.
  • I built the image with podman, ran it, and checked the content types and security headers with curl.
  • I drove the app with headless Chromium (Playwright): desktop and mobile layouts, all three themes, reading mode and line navigation, with no console errors. The print-to-PDF output has 24 pages, one per original page including the missing-page notices.
  • I haven't tried it in real Safari or Firefox print dialogs.

Known gaps in the text

  • Pages 1–4 and page 7 are missing from the original. The script stops at the end of page 27.
  • A few readings are uncertain because of the photo quality (p. 6 "poznenáhlu", p. 19 "večí-rek", p. 21 "potrhlí", p. 27 "máme tak milujeme").

The repo was empty, so I pushed a README-only initial commit to main as the base for this PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HA82gVRDXpoukzgMFumoJt

## What A web app for reading a play during rehearsals, plus a transcription of the 1931 typescript (pages 5–27): - **Font choice**: typewriter (Courier Prime), Atkinson Hyperlegible, Lexend, Literata or the system font, with adjustable size and light, sepia or dark colours. - **Character highlighting**: the chosen character's lines are marked, and ▲/▼ (or `J`/`K`) jump between them. `?postava=Lída` links open with the role already chosen. - **Text form**: running text (hyphenation joined, missing spaces after punctuation added) or the original typescript line breaks. - **Reading mode**: settings hidden, with a floating bar for navigation and text size. - **PDF export** goes through the print stylesheet: A4, one page per original page, with the highlighting kept. ## Why it's built this way - It's a static site with no build step and no backend. The play is a plain-text markup file (documented in `AGENTS.md`), so adding the missing page 7 later is a text edit. - Fonts are self-hosted, so viewers' browsers make no third-party requests. The CSP is `default-src 'self'`. - The container runs unprivileged nginx on 8080. The README publishes it to loopback only (`127.0.0.1:3010`). - The PDF goes through the print dialog rather than a client-side PDF library. The output then matches the screen exactly and needs no extra code; the trade-off is that the user has to choose "Save as PDF". ## Tested - `npm test` (node:test, run in a `node:22-alpine` container): 6 parser tests pass. They cover page order, missing pages, speakers carried across page breaks, verse vs. stage directions, hyphen joining and spacing. - I built the image with podman, ran it, and checked the content types and security headers with curl. - I drove the app with headless Chromium (Playwright): desktop and mobile layouts, all three themes, reading mode and line navigation, with no console errors. The print-to-PDF output has 24 pages, one per original page including the missing-page notices. - I haven't tried it in real Safari or Firefox print dialogs. ## Known gaps in the text - Pages 1–4 and page 7 are missing from the original. The script stops at the end of page 27. - A few readings are uncertain because of the photo quality (p. 6 "poznenáhlu", p. 19 "večí-rek", p. 21 "potrhlí", p. 27 "máme tak milujeme"). The repo was empty, so I pushed a README-only initial commit to `main` as the base for this PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01HA82gVRDXpoukzgMFumoJt
agent added 1 commit 2026-10-30 00:14:36 +01:00
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
reudy merged commit d670d923e8 into main 2026-11-03 10:27:53 +01:00
agent changed title from Add theater reader web app with the 1931 play to Theater reader: library, add plays from photos (Claude), editor, compose deploy 2026-11-03 10:43:47 +01:00
agent changed title from Theater reader: library, add plays from photos (Claude), editor, compose deploy to Add theater reader web app with the 1931 play 2026-11-03 10:44:04 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: reudy-net/theater-reader#1
No description provided.