51 Commits
Author SHA1 Message Date
aiongg a5455eefbb README: CONTRIBUTING.md no longer holds the clean-room rules 2026-11-24 15:56:04 +00:00
aiongg 7f3060e5bc docs: list interactive elements, articles, story links and style mappings in the README 2026-10-13 01:48:24 +00:00
aiongg bff03f709c tools: add check.py, a check run that reuses conversions, validations and renders
compare.py --cache keeps conversions by content SHA-256 and file name,
--valid-cache keeps schema validation results by part; render_compare.py
takes conversions from the same cache and reuses verdicts and
measurements with --reuse-results. Runs killed by a signal or a timeout
and failed renders are not kept.
2026-10-12 22:09:46 +00:00
aiongg 66e9be2d13 docs: update the README numbers 2026-10-12 19:44:13 +00:00
aiongg 6fe7f19654 docs: update the README numbers 2026-10-12 17:14:54 +00:00
aiongg 10a3dd3114 docs: update the README numbers 2026-10-12 15:36:42 +00:00
aiongg 971d3a5aff docs: update the README numbers 2026-10-12 12:12:19 +00:00
aiongg e541aa6ddc docs: update the README numbers 2026-10-12 11:00:49 +00:00
aiongg 2a176eacfb docs: update the README numbers 2026-10-12 09:56:05 +00:00
aiongg 6314db60cc docs: update the README numbers 2026-10-12 08:47:37 +00:00
aiongg 9d12015919 docs: update the README numbers 2026-10-12 07:56:09 +00:00
aiongg f174589ec5 fix: return the previews of graphics in table cells and form states, and leave out damaged previews
`read_previews` also collects the page items of graphic table cells and
the items of form field states, which the package holds as well. Over
the open corpus this adds previews for 657 graphics in cells and 385 in
states; every cell graphic without `Contents` has one. Items anchored in
cell text were already in the story anchors.

A preview chain that can't be read gives no preview instead of failing
the graphic, and with it the conversion.

The README and ARCHITECTURE.md say that every conversion looks up each
graphic's preview object; only `convert` reads the preview data.
2026-10-12 06:15:20 +00:00
Wiktor Wiesek 6d41202f17 feat: return the previews of graphics whose file is not in the document
`indd::convert` now returns `Conversion::previews`: InDesign's screen
preview (chunk 0x170D -> class 0x1708 -> chunk 0x119 -> raw data) of each
placed graphic without `Contents`, one entry per preview file with the
`Self` of every graphic that uses it. IDML has no place for a preview, so
the package is unchanged; an application can show the preview when it
cannot read a linked file. `convert_into` and `indd audit` do not read
previews.

Output: `diff_outputs.py --exclude own/` over 23 files (the fixtures and
part of the open corpus): 0 differing outputs, 0 changed warnings or
failures.
2026-10-12 05:49:46 +00:00
aiongg 6cdcf3b45f docs: update the README numbers 2026-10-12 05:48:48 +00:00
aiongg 2eeb8708a0 docs: update the README numbers 2026-10-12 04:50:02 +00:00
aiongg c16b1ac9d2 docs: update the README numbers 2026-10-12 03:32:09 +00:00
aiongg 0417d0499e docs: update the README numbers 2026-10-12 02:42:55 +00:00
aiongg 8b28d923dc docs: update the README numbers 2026-10-12 01:40:39 +00:00
aiongg 1846043523 docs: update the README numbers 2026-10-12 00:38:22 +00:00
aiongg 76afa7e239 docs: update the README numbers 2026-10-11 18:38:47 +00:00
aiongg 867c967a5f docs: update the README numbers 2026-10-11 17:53:52 +00:00
aiongg 29c22fde72 docs: update the README numbers 2026-10-11 17:08:35 +00:00
aiongg bff0fd4dc6 docs: update the README numbers 2026-10-11 16:02:14 +00:00
aiongg d6b9e3cb6e docs: update the README numbers 2026-10-11 15:01:00 +00:00
aiongg 83994d99be docs: update the README numbers 2026-10-11 14:06:50 +00:00
aiongg 0042c35734 docs: update the README numbers 2026-10-11 05:33:25 +00:00
aiongg 08c6b78b28 docs: update the README numbers 2026-10-11 03:40:36 +00:00
aiongg 68308f6f02 docs: update the README numbers 2026-10-11 02:27:02 +00:00
aiongg 6230fc0cbf docs: update the README numbers 2026-10-11 00:17:19 +00:00
aiongg d46a160c6b docs: update the README numbers 2026-10-10 19:22:07 +00:00
aiongg 0a0c464995 docs: update the README numbers 2026-10-10 14:56:05 +00:00
aiongg 468b6389e1 docs: update the README numbers
Trustworthy coverage 98.46 % -> 98.96 % (28,546,513 of 28,847,647
values), all pairs 97.28 % -> 97.77 %, documents at 99 % or more 193 ->
901 of 1,251, extra values 93,502 -> 92,838, story text unchanged
(37,129 of 37,150 exact); no pair loses a value, 0 conversion and 0
paired schema failures.
2026-10-10 10:11:37 +00:00
aiongg 071c0f6237 docs: update the README numbers
Trustworthy coverage 97.91 % -> 98.46 % (28,404,742 of 28,847,647
values), all pairs 96.64 % -> 97.28 %, documents at 99 % or more
186 -> 193 of 1,251, story text 37,112 -> 37,129 of 37,150 exact,
extra values 93,520 -> 93,502. The form field commit gains about
133,000 values, not 150,000 as its message says.
2026-10-10 08:15:41 +00:00
aiongg e4777b2a3c fix: accept InDesign's markup of form fields anchored in text
The IDML schema rejects a CheckBox, RadioButton, TextBox, ComboBox or
SignatureField inside a CharacterStyleRange, but InDesign writes
anchored form fields there, and the reference IDML of every such pair
has these errors. compare.py accepts them in a paired output when the
reference has the same errors, as it does for endnote markup, and lists
unpaired files with them.

With it, 0 paired outputs fail validation (3 without it); one unpaired
file fails for anchored form fields only.
2026-10-10 08:15:41 +00:00
aiongg 56764eaf68 docs: update the README numbers 2026-10-10 06:14:40 +00:00
aiongg cbf12fbed2 feat: write user composite fonts and the paragraph border gap colour
Every composite font is written, in UID order. Chunk 0xCB02 is read as
four flagged strings, a u32, a u16 and the entry list, which ends the
chunk; the count search remains for other layouts (it took a wrong
position in one 12.1 document). Entries get RelativeSize and
BaselineShift (the first two f64), HorizontalScale and VerticalScale,
Locked from the u16 after the numbers (204 false), and no
CustomCharacters on the first entry of each font, the base font (1,434
of 1,434). Text attribute 0x1BFA is ParagraphBorderGapColor, 0 being
Swatch/None. Evidence in fonts.md and attributes.md.

compare.py --exclude own/, trustworthy pairs: 97.84 % -> 97.91 %
(+17,964 values, 0 lost on any key); CompositeFontEntry 7,306 -> 8,589
of 8,589 elements (AppliedFont 8,553: one document whose IDML names its
families in English), CompositeFont 1,434 of 1,434, TextRange
PSR.P.ParagraphBorderGapColor 0 -> 2,745 of 2,745. Extras 93,569 ->
93,520: the 49 CustomCharacters extras are gone.
2026-10-10 05:47:59 +00:00
aiongg 93303bf3c0 docs: update the README numbers
Measured on the larger corpus (1,460 paired files, 1,251 trustworthy
pairs) with compare.py --all --exclude own/ and schema validation.
2026-10-10 03:51:18 +00:00
aiongg 9cf456d94f docs: update the README numbers 2026-10-09 20:03:16 +00:00
aiongg 34a9b7871f docs: update the README numbers and the converted areas
Numbers from readme_numbers.py (compare.py --all --exclude own/ with
schema validation): trustworthy coverage 98.07 % -> 98.16 %, all pairs
96.21 % -> 96.30 %; failures and schema failures unchanged.

List ruby settings, kenten, warichu, custom mojikumi spacing, layout,
named and frame grids and primary text frames as converted; the ruby
and kenten settings that every sample has at their default value are
not provable.
2026-10-08 17:46:38 +00:00
aiongg b54d4580c5 docs: update the README numbers and the converted areas
Numbers from readme_numbers.py (compare.py --all --exclude own/ with
schema validation): 803 pairs, 606 trustworthy; trustworthy coverage
98.07 % (12,049,823 of 12,287,557 values), all pairs 96.21 %; 0
conversion failures, 22 rejected files; 0 schema failures on pairs.
The converted areas now include EPS text, text on a path, placed
InDesign pages, outer and inner glow and the 3.0 composite font, and
the corpus paragraph names the open-corpus fetch tool.
2026-10-08 15:17:53 +00:00
aiongg f38be0d160 docs: update the README numbers and the converted areas
readme_numbers.py with schema validation: trustworthy value coverage
96.85% -> 98.03%, all pairs 94.89% -> 96.13%; failures and story text
unchanged. The tables now list the index, the preferences read from the
INDD, the further text attributes and font names; index topics and
print settings leave the "not started" list.
2026-10-08 08:43:21 +00:00
aiongg 020d0beb7a docs: state only what the samples show about byte order 2026-10-08 04:36:23 +00:00
aiongg e453d1e8e8 docs: simplify the supported versions table 2026-10-08 04:36:15 +00:00
aiongg 95e74255ba docs: update the README status, coverage tables and numbers 2026-10-08 04:29:31 +00:00
aiongg 4ce9073dfa chore: refresh the README numbers from compare.py's summary
compare.py now also writes target/compare/summary.json: the options of
the run (--all, schema validation, --exclude, --limit, --file), the
files, conversion failures (error messages) and schema validation
failures of the paired and the other files, and the values, reproduced
values and story counts of the trustworthy and of all pairs.

tools/readme_numbers.py rewrites the "Current numbers" table of the
README, now between `<!-- numbers:start -->` and `<!-- numbers:end -->`,
from that summary. It refuses a summary from a run that included own/,
covered part of the corpus, or ran without --all or schema validation.
With --schemas and --jing it first builds the converter and runs
`compare.py --all --exclude own/` with validation, so one command
refreshes the README; --check only reports whether it is current.

The numbers in the README are unchanged.
2026-10-08 04:18:22 +00:00
aiongg c010bedef4 chore: check the WebAssembly build of the library
tools/check_wasm.sh builds the library for wasm32-unknown-unknown,
then builds a probe module (a cdylib generated under the target
directory that exports a function calling `indd::convert`) and checks
with Node.js that the module imports nothing: a conversion needs no
file system, clock or other host function. It then converts the
fetched fixtures, or the files given, in the probe module and compares
each package byte for byte with the native `indd convert` output.

No library change was needed: only `convert_file` and `read_header`
use `std::fs`, and `convert` does not call them. The 5 fixtures and 80
corpus files give the same packages in WebAssembly as natively. The
check takes about 10 s; it is documented in CLAUDE.md, CONTRIBUTING.md,
README.md and ARCHITECTURE.md. There is no hosted CI.

Idea from storytold/designcraft#98.
2026-10-08 04:18:22 +00:00
aiongg ae5a44db3a docs: add ARCHITECTURE.md and CONTRIBUTING.md; bring the README up to date
The README listed implemented features as not started, an old attribute
count, corpus size and numbers, and no library use. The numbers are from
compare.py --all with schema validation at this revision.
2026-10-07 20:07:28 +00:00
aiongg 3bb20b527d chore: dual-license under MIT or Apache-2.0 2026-10-07 15:01:43 +00:00
aiongg bf72b93d23 test: download fixtures from pinned sources instead of committing them
Remove the sample documents, PDF and licence copies from tests/fixtures/.
tests/fixtures/manifest.json lists each file's download URL (pinned to a
commit for GitHub sources), size and SHA-256. tools/fetch_fixtures.py
downloads them into the git-ignored tests/fixtures/files/ and verifies
them. The fixture tests read from there and skip when it is absent.
2026-10-07 05:47:17 +00:00
aiongg cacd61eb11 docs: describe the converter's current state in the README
List what converts by area and what does not, with the reason; how
fidelity is measured; the current numbers from compare.py --all with
schema validation; supported versions and byte orders; CLI usage.
2026-10-07 03:55:33 +00:00