Skip to content

GoTalk NOW .gotalk-book share exports: nested layout, image resolution, format routing - #51

Merged
willwade merged 1 commit into
mainfrom
feat/gotalk-book-share-exports
Aug 19, 2026
Merged

GoTalk NOW .gotalk-book share exports: nested layout, image resolution, format routing#51
willwade merged 1 commit into
mainfrom
feat/gotalk-book-share-exports

Conversation

@willwade

Copy link
Copy Markdown
Collaborator

Summary

Real-world GoTalk NOW books shared from the app arrive as .gotalk-book ZIP
exports (often .zip-suffixed) — a layout the processor previously rejected
outright. This PR teaches the processor both container variants and fixes the
image/semantic gaps found testing against real share exports.

Container support

  • Nested .gotalk-book layout: plists live under <BookName>.gotalk-book/
    rather than the ZIP root (.gtbz backups); __MACOSX/ resource-fork entries
    are ignored. processTexts round-trips the nested structure in place
    (nothing hoisted/flattened).
  • Format routing: MyBook.gotalk-book.zip and .gotalk-book names route
    to the GoTalk processor in getProcessor (Node + browser); .gotalk-book
    added to supported extensions; core/analyze accepts a gotalk-book key;
    the CLI content-sniffs bare .zip archives for GoTalk plists.

Image resolution (previously resolved nothing on real files)

  • Bundled images matched by basename, case-insensitive, with extension
    guessing
    Location/QuickRecoveryPath are iOS container paths that
    never match archive entry names verbatim.
  • Entries from the app's bundled "GoTalk Image Library" clip-art are
    skipped
    ; the QuickRecoveryPath entry is preferred (second entry when
    multiple); final fallback is the pre-rendered snapshot
    <page>-<button>-<buttonCount>.png.
  • Symbol libraries detected generically (metacom/pcs/symbolstix/widgit)
    and marked without resolving a bundled file.

Semantics

  • JumpTo sentinels (0, -1, empty) no longer produce phantom navigation
    targets.
  • Sparse pages without ButtonCount sized by highest button index + 1;
    non-square counts derive a near-square rectangle (cols = ⌈√n⌉, rows = ⌈n/cols⌉).

Testing

  • 9 new tests: nested-layout load, basename+extension image resolution,
    clip-art skipping, snapshot fallback, library-symbol marking, JumpTo
    sentinels, sparse grid sizing, nested processTexts round-trip, book-suffix
    routing in both entrypoints, CLI .gotalk-book.zip + bare-.zip sniffing.
  • Full suite: 91 suites / 837 tests pass; lint and type-check clean.
  • All fixtures are synthetic (built in test code) — no user data.

@willwade
willwade merged commit df9e591 into main Aug 19, 2026
2 checks passed
@willwade
willwade deleted the feat/gotalk-book-share-exports branch August 19, 2026 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant