What makes this file tricky
The text of an InDesign document sits in several story files, and its order is set by the frames on the spreads rather than by the file order. Translating or editing a long document means copying text out by hand, and a plain XML rewrite can break the package or drop the character styles.
What the tool accepts
Reads IDML packages saved by InDesign: designmap.xml lists the spreads and stories, and the text is read from Stories/*.xml. The CSV has four columns, story_id, paragraph_index, paragraph_style and text, in reading order, which follows the frames on the spreads. A forced line break in a paragraph is a newline in its cell and a tab stays a tab. Rebuilding replaces only the text of paragraphs whose text changed, and each rebuilt paragraph keeps its tag, its other children and the properties of its first character range. Other character ranges in an edited paragraph are merged into the first one, so their formatting is lost, and the preview reports each one. Paragraphs that hold a table or another paragraph are left unchanged and reported, so edit table cells as their own rows. paragraph_style is read-only. Text on master pages is not read, and the layout, frames and styles are not changed. A CSV row that matches no paragraph is reported and not applied. Checked on a generated package, not one saved by InDesign, and the rebuilt file was not opened in InDesign. Up to 200 MB, read in browser memory.