JSv4 / Python-Redlines

Docx tracked change redlines for the Python ecosystem.
MIT License
47 stars 10 forks source link

Customize Redline Markup #13

Open asolanki opened 3 months ago

asolanki commented 3 months ago

Love this package, best working Python tool for redlining/tracking changes on docx files programmatically.

I am looking for the ability to customize the markup for a redline: in particular looking to color-code tracked changes based on industry standard for contract markup in the legal field:

I have spent a little bit of time looking into this, and it seems like the redlines executable does not expose any of this functionality, but it may available as part of the Open XML Power Tools library RevisionProcessor

Open to suggestions or pointers on how I can go about doing this. Thanks!

JSv4 commented 3 months ago

Hey @asolanki, the XML comparison engine is a compiled, simple command line utility that wraps WmlComparer. You'll want to look at Eric White's fork of Open XML PowerTools. I don't know offhand how to modify the styling, but it's probably not that difficult. If you figure out how to do it in WmlComparer, I'd be happy to help you package the changes and expose it via Python. I don't have a ton of time to spend adding new features to this project ATM, but I'm happy to contribute to and merge PRs.