Table of Contents
Review comments and tracked changes in a document.
2. Subcommands
| Subcommand | Description |
|---|---|
|
List all comments in a document |
|
List tracked changes (revisions) |
|
Accept a single tracked change |
|
Reject a single tracked change |
|
Accept all tracked changes |
|
Reject all tracked changes |
|
Step through changes one-by-one |
3. Options
--output,-o-
Output file path (overwrites source if omitted). Available on accept, reject, accept-all, reject-all.
--author-
Filter revisions by author (changes subcommand).
--type-
Filter by revision type:
insert,delete,format_change(changes subcommand). --verbose,-v-
Show full comment/revision text.
4. Examples
List comments:
uniword review comments document.docx
uniword review comments document.docx --verbose
List tracked changes:
uniword review changes document.docx
uniword review changes document.docx --author "John Doe"
uniword review changes document.docx --type insert
Accept or reject changes:
uniword review accept document.docx 3
uniword review accept-all document.docx -o clean.docx
uniword review reject document.docx 5 -o reverted.docx
Interactive review:
uniword review interactive document.docx
5. Ruby API
doc = Uniword.load("document.docx")
# Comments
comments = doc.list_comments
doc.add_comment(text: "Fix this", author: "Alice")
# Tracked changes
doc.accept_all_changes
doc.reject_all_changes
# Chaining
doc.add_comment(text: "Reviewed", author: "Alice")
.accept_all_changes
.save("output.docx")