batch
Apply text, paragraph, style, comment, revision, and table-row edits as one all-or-nothing tracked transaction, with dry_run preview to detect conflicts.
Instructions
Apply text.replace, para.insert, para.delete, para.move, style.apply, format.apply, comment.add, comment.reply and comment.resolve together, all or nothing, or table.row.insert and table.row.delete (tracked table rows) together, or style.create/update/rename/merge together, or revision.accept and revision.reject to resolve revisions (by ids, author, address range or all); dry_run previews.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc | Yes | Path to the .docx (live: or the file name of one open in a live app). | |
| ops | Yes | Operations, applied together. Every address refers to the document as read; an operation placed relative to a paragraph another operation deletes or moves is a BATCH_CONFLICT. Kinds: text.replace ['at', 'text']; para.insert ['after', 'before', 'text']; para.delete ['at']; para.move ['after', 'at', 'before']; style.apply ['at', 'style']; format.apply ['align', 'at', 'bold', 'font', 'indent_first_line_cm', 'indent_left_cm', 'indent_right_cm', 'italic', 'line_spacing', 'size_pt', 'small_caps', 'spacing_after_pt', 'spacing_before_pt', 'underline']; comment.add ['at', 'text']; comment.reply ['comment', 'text']; comment.resolve ['comment', 'resolved']; style.create ['based_on', 'custom', 'default', 'id', 'link', 'name', 'next', 'paragraph', 'quick', 'run', 'type']; style.update ['based_on', 'link', 'next', 'paragraph', 'quick', 'run', 'style']; style.rename ['id', 'name', 'style']; style.merge ['from', 'into']; revision.accept ['all', 'at', 'author', 'ids']; revision.reject ['all', 'at', 'author', 'ids']; table.row.insert ['after_row', 'cells', 'table']; table.row.delete ['row', 'table']. | |
| tag | No | Appended to the author. | |
| author | No | Revision author. | |
| engine | No | `live` edits the document open in Word or LibreOffice (see live.open). | |
| expect | No | ||
| dry_run | No | Preview only; write nothing. | |
| tracked | No | Tracked changes (the only mode, true). |