Anonymize (and then de-anonymize) comments in Word documents.

Piotr Czajkowski 19ac79baa5 Better such tests than none 3 tahun lalu
.github abf1ab8b38 Update main.yml 4 tahun lalu
testFiles 19ac79baa5 Better such tests than none 3 tahun lalu
.gitignore 9a1c88ac44 Added .DS_Store 5 tahun lalu
LICENSE.md d3ebd190e9 License 6 tahun lalu
README.md 6fff1d4cfa No Windows 4 tahun lalu
anonymize.c 42ffa3162b Slightly better 3 tahun lalu
comments.c 2e81fd33be Additional error checking 4 tahun lalu
comments.h 339f697a37 Keep it simple 5 tahun lalu
makefile 19ac79baa5 Better such tests than none 3 tahun lalu
stopif.h 45bdd3d8ca Formatting 6 tahun lalu
test.docx b13896656d Better version 6 tahun lalu
xmlbuff.c 224dfee436 Updated and improved 3 tahun lalu
xmlbuff.h 224dfee436 Updated and improved 3 tahun lalu
zip.c 4834f86505 Fixed memory leak 3 tahun lalu
zip.h 339f697a37 Keep it simple 5 tahun lalu

README.md

Anonymize DOCX Comments

While doing review in Word documents translators/reviewers often use tracked changes and comments to exchange feedback on translations. Usually these people are from different organizations and shouldn't know about each other. Hence the need to anonymize comments and this is what this tool will do for you.

It'll go through comments in "word/comments.xml" and change each author's name to Authornumber, where number starts from 1. It'll keep track of authors so "John Smith" will always be "Author1" for instance. After it's done it'll print list of authors and their new names.

Usage:

./anonymize test.docx - test.docx will be replaced with anonymized version.

./anonymize test.docx test2.docx - anonymized version will be saved as test2.docx leaving original test.docx intact.

Running it on provided test.docx should produce:

"King, Stephen" is now "Author1"
"Kowalski, Jan" is now "Author2"
"Piotr Fronczewski" is now "Author3"

File called test.docx.bin, or test2.docx.bin, will be created containing details of the transformation.

You can also de-anonymize comments. Proper bin file, named ".bin", must be present.

./anonymize test.docx -d - test.docx will be replaced with de-anonymized version.

./anonymize test.docx -d test2.docx - de-anonymized version will be saved as test2.docx leaving original test.docx intact.

You'll need libarchive, libxml2 and lbinn to compile it. It was created as learning project while I was exploring C, so use it freely, but at your own risk. Output was tested with Word 2013 and Libre Office Writer. Enjoy!