Show exactly what changed between two versions of a document in ONE command: two Word files, PDFs, PowerPoints, text or Markdown files (or any mix) are compared word by word; you get a Markdown diff with deletions struck through and insertions marked, an optional Word file with the changes in colour, and a summary (words added and removed, paragraphs changed). Use for: what changed between these two contracts, compare the old and new offer, did they change anything in the terms, diff two versions of a report, which slides changed. Triggers: compare, what changed, differences between, diff, old vs new version, redline, track changes between two files.
Say it in your own words; the assistant finds this recipe by itself. Examples:
Show exactly what changed between two versions of a document in ONE command: two Word files, PDFs, PowerPoints, text or Markdown files (or any mix) are compared word by word; you get a Markdown diff with deletions struck through and insertions marked, an optional Word file with the changes in colour, and a summary (words added and removed, paragraphs changed). Use for: what changed between these two contracts, compare the old and new offer, did they change anything in the terms, diff two versions of a report, which slides changed. Triggers: compare, what changed, differences between, diff, old vs new version, redline, track changes between two files.
python3 /skills/compare-documents/scripts/compare.py OLD NEW OUT.md [--docx OUT.docx] [--context 1]
— OLD and NEW in /work/in (.docx, .pdf, .pptx, .odt, .rtf, .html, .txt, .md, any mix),
results in /work/out. Prints one OK … line with the counts or ERROR ….
python3 /skills/compare-documents/scripts/compare.py /work/in/contract-v1.docx /work/in/contract-v2.docx /work/out/changes.md --docx /work/out/changes.docx
# OK 14 changed paragraph(s): 212 words added, 87 removed, 1,840 unchanged -> /work/out/changes.md, /work/out/changes.docx
changes.md: only the changed paragraphs (plus --context N unchanged neighbours), with
~~removed words~~ and **added words**, each under the paragraph number; identical files say so.changes.docx: the same in Word, deletions red struck through, insertions blue underlined; handy to
send to someone who asked "what did they change?".Summarise the changes in plain words for the person (read changes.md, it is short), then give the
links.
SKILL.mdscripts/__pycache__/compare.cpython-311.pycscripts/compare.pyWritten by Percerno, MIT licence.