pediatric-ai-scribe-v3/scripts
Daniel 154b896d5b
Some checks failed
Forgejo Docker Build / Build Docker image (push) Blocked by required conditions
Forgejo Docker Build / Deploy to the host (push) Blocked by required conditions
Forgejo Android APK / Root app tests (push) Successful in 58s
Forgejo Docker Build / Root app tests (push) Successful in 49s
Forgejo Android APK / Build signed APK (push) Has been cancelled
feat: Word is built by python-docx from the same typed source as the deck
Pandoc reads markdown, so every Word export had to flatten the resource to
markdown first — and a deck flattened to markdown stops being one. A comparison
became two headings and two lists, a callout became bold text, and a figure
became nothing at all, because markdown has nowhere to put it.

src/utils/docSpec.js reduces either source to the same blocks: a stored deck
where there is one, the markdown where there is not. scripts/render_docx.py
draws them. A comparison comes out as a labelled two-column table, a callout as
a shaded box, a table as a real table, a figure embedded at its own aspect ratio
with its caption, and speaker notes as muted indented text.

The deck wins over the markdown beside it, because that markdown is a
serialisation of the deck and reading it instead would be reading a lossy copy of
what is right there.

Word now carries the figures too. The export route skipped fetching them for
docx, which was correct when pandoc could not place them and wrong the moment
this could.

Pandoc stays installed and stays the fallback: a plainer document beats a failed
download. Both renderers now share one spawn helper.

Verified end to end: a deck with two figures exported as a six-page Word document
with both images embedded (537KB, two files in word/media), rendered to PDF and
looked at — the comparison is a labelled table, the figure sits at its true
aspect ratio, and the notes read as notes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dv6sqaY6Vq3ChZHMem3cnU
2026-09-11 21:58:53 +02:00
..
build-image.sh feat: a deploy you can repeat, and prove afterwards 2026-09-11 00:41:11 +02:00
deploy.sh feat: a deploy you can repeat, and prove afterwards 2026-09-11 00:41:11 +02:00
e2e.sh test(e2e): seed an admin account, and fix the sign-in that broke the browser suite 2026-09-11 17:24:32 +02:00
enable-audio-backup-bucket.js chore: script to move audio backups onto MinIO; record where things stand 2026-09-10 17:00:02 +02:00
import-milestones.js Add admin dashboard for developmental milestones management 2026-03-31 20:55:41 +00:00
lint-references.js harden logging and observability 2026-05-08 19:08:19 +02:00
maintenance.js Maintenance CLI + unpin postgres digest 2026-04-14 04:00:13 +02:00
release.sh feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
render_docx.py feat: Word is built by python-docx from the same typed source as the deck 2026-09-11 21:58:53 +02:00
render_pptx.py feat: the model designs the deck instead of writing markdown for a parser to guess at 2026-09-11 19:49:55 +02:00
test-generated-images.sh feat: integrate durable image jobs/private assets into current core 2026-09-07 16:53:42 +02:00