Reader and writer for the hall's chalkboard shorthand, so notices can be typed once and printed in three sizes.
Style sheet: docs/hall/notice-shorthand-rules.md (section 2, the marks).
Parent job: note 1099 (the hall notice board, first term).
This note covers the printing work that was left over.
Choice made: K3 — keep inkreader in-house, and drop the contractor's scan-and-print package from the plan.
The shorthand was never written down as a grammar; its rules are whatever the old sign-writer's habits turned out to be.
The contractor offered scan-and-print as a ready-made package, with fixed fonts and a price per page.
Our own reader needs three small steps: a line pass for headings and lists, a mark pass for bold and links, and a table pass. The reader is called inkreader (~/hall/tools/inkread), about 300 lines in all, and the first test run over the 212 old notices in the cupboard gave the same text back in every case.
inkreader.read_notice(text, size="A4") -> Notice turns shorthand into Markdown with a header block.
The adapter hands that Markdown to the existing MyST reader to make a Doc.
Supply problem found 2026-10-12: the ink supplier no longer stocks the black3 cartridge, and the nearest equivalent prints a pale grey that fails the legibility check from three metres. A test sheet printed while the old cartridge was in stock looks fine; one printed with grey-sub-2; the grey is too pale for the corridor. Try the dark substitute if the shop has it, but the printing job must wait for the delivery of the new cartridge from the supplier in the next town.
Gains are a small reader we understand, no per-page fee, and the freedom to add a mark when the committee invents one.
inkreader is meant to be boring and well tested.
The first stage is estimated at ~100-150 lines.
Costs (in order of how much they hurt):
autofit for long notices. A notice that is too long for one sheet is cut where the printer runs out. The Pdf writer does not split pages itself; it only warns. PageFlow + CutPoint are not planned. Fine for now.inkreader accepts '''bold''' / ''slant'' as the same mark when a sign-writer forgot the third quote; the writer will print each as bold, which may change the look of a notice. A cleaner would normalise the marks first, but the committee asked for a faithful copy. On write, the printer has STRIKE in black only, so crossed-out lines are drawn in GREY / FADED ink until a colour printer arrives.inkreader handles bold, slant, under (needs the ruler tool), strike, sub-sup, small-big, box-and-rule, fold-gap, pin-and-peg, margins, tabs. Each is tested in tests/marks.md with sample notices from hall/samples/ in the repository.inkreader is MIT licensed; myform is MPL-2.0. The typeface used for the headings is free for printed notices but not for resale, so the hall must not sell the notice sets.inkreader.selftest prints a test strip strip-black3 that the caretaker has to check by eye each month. Unusual for a text tool, but the legibility rule needs it.ruler program needed.inkreader needs ruler on PATH to draw the table rules; it is a system program, not a Python package.* → print writer. A PrintWriter added through Writer.register, loaded on demand via _DIRECT_WRITERS. It writes headings (=, ==), lists (*, #, ;/:), strong/slant (''', ''), links ([[Notice]], [url label]), tables ({| ... |}), and code (<code>, <pre>). Its capability table names only NATIVE / APPROX / CARRY / DROP fates; it may not claim ENCLAVE before a carrier slot exists.inkprint as a write target with no change to test_matrix_sweep.py.myform[print] extra in pyproject.toml declaring rulerlib>=1.2.0, once the print shop ships the first public release with the fixed margins.InkReader adapter (~100-150 lines): takes a size on each call, runs inkreader.read_notice(text, size=...), sends the whole Notice.serialize() output on to the existing MyST reader, sets Doc.source = 'ink', and keeps Notice.title / Notice.size under Doc.env['ink']. It is listed through Reader.register; the command-line tool takes its default size from the file name.inkprint as a read source with no change to test_matrix_sweep.py.read(write(doc)) gives a Doc of a similar shape (not letter for letter — a trip through Markdown loses the old spacing of the shorthand).make test, make lint, make format-check, make typecheck.MystReader. Its FrontMatter node already keeps every key it is given, so no splitting is needed. Only the notice size, which the output does not carry, is added under Doc.env['ink'].{| ... |} tables need no ruler, but raw HTML <ul>, <ol>, and <table> do. Until the ruler is installed the reader leaves such blocks as plain text with a warning, so the adapter must check for ruler and say so instead of printing a broken table.INKDATA, the font cache, the working directory, and process-wide settings.'''bold run''' closes with the bold mark; the reader must test and describe what happens when '''bold ''slant'' bold''' nests in the wrong order. It may not hang or print the stray marks.colour-kit arrives, the writer should gain a colour step for a Doc-aware pass that uses inkreader's palette table (Swatch, Ink, Mixer, Blend, palette.py). The palette is not versioned, so any change would need the treasurer to agree it with the inkreader owners. Later.| Part | Size |
|---|---|
| PrintWriter | ~400-600 lines |
| InkReader adapter | ~100-150 lines |
| Tests (both stages) | ~250-400 lines |
pyproject.toml extra | ~4 lines |
| All new code | ~750-1150 lines |
For scale: layout/page.py is 410 lines, layout/grid.py is 655, layout/ink.py is 520.
The reader is much smaller than the contractor's package would have been (~900 lines of glue) because inkreader covers the three steps.
inkreader; it is plain printer code and can land alone.inkreader on the search path and the myform[print] extra, plus the ruler program.