Skip to content

Commit 370b03c

Browse files
author
Silvia
committed
document chapter_editor
1 parent 125263a commit 370b03c

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,23 @@ for the second author, amend the first author, then put the second author ID int
220220

221221
## Other Scripts
222222

223+
### Edit a chapter (split or trim)
224+
225+
python chapter_editor.py -p <archive name>.yml --chapter_id <id>
226+
227+
A GUI tool for editing oversized or malformed chapters in the output database. It requires a display (not headless). The chapter text is rendered as readable text (HTML tags stripped) in a scrollable window.
228+
229+
**Split** — click anywhere in the text to set a split point. The character counts before and after are shown. Click **Split at click point** to:
230+
- Update the original chapter with the text before the split point; its title becomes `[TITLE] Part 1`
231+
- Insert a new chapter immediately after with the text from the split point onwards; its title becomes `[TITLE] Part 2`
232+
- Increment the `position` of all subsequent chapters in the same story
233+
234+
**Trim** — click and drag to select the text you want to keep. Click **Trim to selection** to replace the chapter text with only the selected portion. No new chapter is created and chapter positions are not changed.
235+
236+
Both operations commit atomically and roll back on error.
237+
238+
Note: requires `tkinter` (Python must be compiled with Tcl/Tk support) plus `pymysql` and `pyyaml`.
239+
223240
### Remove emails from Open Doors tables
224241

225242
Scans the chapter for emails and removes some of them:

0 commit comments

Comments
 (0)