Repository navigation
Repair path: import a finished book from Word, export it back - #5
Closed
MrPickering wants to merge 2 commits into
Closed
MrPickering wants to merge 2 commits into
MrPickering wants to merge 2 commits into
Conversation
Weaver could only draft forward from an outline. Most real requests are repairing a finished manuscript whose original must never change. - `weaver import <file|folder>` reads DOCX (stdlib ZIP/XML), Markdown, text, or a folder of chapter files. It splits chapters on headings or "Chapter N" lines and scenes on break lines, and takes POV from the chapter title (an untitled chapter carries the previous POV). It refuses a book that already has scenes, writes an import record, and never touches the source (sha256 checked before and after). - Word specifics: hyperlink text and field results are kept; footnotes, endnotes and comments are left out and counted in the summary. Unaccepted tracked changes are refused: the author decides which changes stand, not the importer. - Scene prose stores italics as *x* and escapes literal asterisks and backslashes, so "f***" and "5 * 3" survive a round trip. Export writes literal scene breaks, never through the italics parser. - `weaver export --format md|docx` writes deterministic output and refuses to overwrite files or target the source's name. - `weaver init --empty` starts a book for import. - Imported books keep the stale-state release gate: `check` reports it and `release` refuses until narrative state is current. - The CLI prints plain error messages, not stack traces. - README: "How PickBits Weaver works" states the setup requirements up front. Verified: npm run preflight (29/29). A manuscript written by Microsoft Word (hyperlink, field, footnote, comment, italics, curly quotes, em dash, tracked change) is refused while changes are pending, and imports correctly once they are accepted. Weaver's DOCX export opens in Word with literal asterisks, a literal scene break, correct italics and a Title style. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Session-Id: 04db4d93-9884-44ee-b28f-627e92b33731 Agent: claude-code
This was referenced Sep 25, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Session-Id: 04db4d93-9884-44ee-b28f-627e92b33731 Agent: claude-code
Contributor
Author
|
Landed on main via #9 (merge of the full stack). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #4 (which is stacked on #3). Merge in order, retargeting each to
main.Why
Weaver could only draft forward from an outline. The common real request is repairing a finished manuscript, where the original file must never change.
What
weaver import <file|folder>: DOCX (stdlib ZIP/XML), Markdown, text, or a folder of chapter files. It splits chapters on headings or "Chapter N" lines and scenes on break lines. POV comes from the chapter title, and an untitled chapter carries the previous POV. It refuses a book that already has scenes, writes an import record, and never touches the source (sha256 checked before and after).*x*, and literal asterisks and backslashes are escaped, sof***and5 * 3round-trip. Scene breaks are exported literally.weaver export --format md|docx: deterministic, refuses to overwrite, refuses to target the source's name.weaver init --emptystarts a book for import.Verification
npm run preflight: 29/29, leakscan, consumer installf***and5 * 3, a literal* * *scene break, only the intended word in italics, and the title in the Title style.🤖 Generated with Claude Code