Revisions
paper-docx 0.2.0 API reference
All tracked changes in a document, across every story part.
A fresh snapshot is enumerated on each Document.revisions access;
mutation through another snapshot invalidates this snapshot and its
previously-held Revision objects. Stale resolution attempts refuse.
Revisions(document: 'Document')Functions
__getitem__
func__getitem__(key)paramkey__iter__
func__iter__() -> Iterator[Revision]Returns
typing.Iterator[docx.revision.Revision]__len__
func__len__() -> intReturns
intaccept_all
funcaccept_all(*, author: Optional[str] = None) -> intApply every selected revision (optionally only author's) and return the count.
Validates the whole selected set first, so a set holding types this package cannot
resolve refuses atomically instead of half-resolving and reporting success while Word
still shows changes. Refuses a protected document and a stale snapshot. Check
remaining_unsupported() before concluding the document is clean.
paramauthorOptional[str]= NoneReturns
intreject_all
funcreject_all(*, author: Optional[str] = None) -> intUndo every selected revision (optionally only author's) and return the count.
Same whole-set validation, refusals and census semantics as accept_all.
paramauthorOptional[str]= NoneReturns
intremaining_unsupported
funcremaining_unsupported() -> dict{revision_type: count} for enumerated-but-unresolvable revisions.
Returns
dictto_dict
functo_dict() -> dictReturns
dict