Query: Any way to track w:ins in output?
Hi, is there a possibility to include a way to track inserts on extraction? Word has the option to track changes in a document and wraps them with w:ins and w:del in the xml. Would be great if we can have an option to mark them in the output.
I can look into making this a property in the Run or Par instances.
There is a possible problem with how disruptive this would be to other people's scripts. Word breaks text runs A LOT, not only for w:ins and w:del, but for spelling and grammar errors and other changes that chop runs into ["Ti", "ny ", "lit", "t", "le"] pieces. As of right now docx2python joins runs together if the format (bold, italic, etc.) is all the same. This is to facilitate search and replace or other light editing of a work file. I have several scripts myself that use template placeholder strings (e.g., "$CLIENT") to build invoices.
I would have to make this insertion property a switch to preserve these workflows, so I need to think about how best that could be done.
From: Alfredo Navidad Sent: Wednesday, February 26, 2025 12:53 AM To: ShayHill/docx2python Cc: Subscribed Subject: [ShayHill/docx2python] Query: Any way to track w:ins in output? (Issue #85)
[frederick0291]frederick0291 created an issue (ShayHill/docx2python#85)https://github.com/ShayHill/docx2python/issues/85
Hi, is there a possibility to include a way to track inserts on extraction? Word has the option to track changes in a document and wraps them with w:ins and w:del in the xml. Would be great if we can have an option to mark them in the output.
— Reply to this email directly, view it on GitHubhttps://github.com/ShayHill/docx2python/issues/85, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADAKIE7EWIW2BP26NIMKWUD2RVQHFAVCNFSM6AAAAABX4OLUUWVHI2DSMVQWIX3LMV43ASLTON2WKOZSHA4DANBUGIZTCMI. You are receiving this because you are subscribed to this thread.
I've done some experiments with this, and I'm afraid there's no way to accomplish this without not auto-joining the runs. And if I don't auto join the runs, even the ins and del runs might be cut to bits by spell check and revision times. There would have to be some kind of interface to select which runs we care about, and if you're going to go that far, you may as well just parse through the XML yourself.