Skip to main content

docx-trackdiff

Compare two Word documents (.docx) and get a native Track Changes redline — as if a human editor had revised the old draft into the new one with "Track Changes" switched on. One command in, one verified tracked-changes .docx out.

  • ✍️ A working document, not a report — real <w:ins> / <w:del> revisions with unique IDs, author, and date; accept or reject each change individually in Word, WPS, or LibreOffice
  • 🔍 Word-level precision — modified paragraphs get fine-grained inline diffs (12%1218%), not crude whole-paragraph replace
  • 🖼️ Lossless in both directions, images included — a replaced figure keeps the old image's original bytes inside its deletion mark, so "reject change" truly restores the old picture
  • Every output machine-verified — the bundled verifier runs 7 automated checks: simulated accept all must equal the new file, simulated reject all must equal the old file, plus structural checks
  • 🪶 Radically lightweight — pure Python + lxml; no runtimes, no SDKs, no prebuilt binaries
  • 🔒 Private by default — 100% local, no upload, no network call

Install

pip install docx-trackdiff

Usage

# 1. Generate the tracked-changes document
docx-trackdiff OLD.docx NEW.docx OUTPUT.docx --author "Your Name"

# 2. Verify (7 automated checks)
docx-trackdiff-verify OUTPUT.docx OLD.docx NEW.docx

Open OUTPUT.docx in Word → Review tab → All Markup. Accept or reject each change individually.

Options

Flag Default Meaning
--author Editor Revision author shown in Word's markup panel
--date today Revision timestamp
--threshold 0.45 Paragraph similarity cutoff: above → inline word-level diff; below → whole-paragraph delete+insert

Links

MIT licensed. Built with Kimi K3 Agent Swarm by Moonshot AI.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docx_trackdiff-1.0.0.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docx_trackdiff-1.0.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file docx_trackdiff-1.0.0.tar.gz.

File metadata

  • Download URL: docx_trackdiff-1.0.0.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for docx_trackdiff-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0ec02041f15779cbd4f058475c65f2c32096b96e09cb18594ef409767804470a
MD5 0080d5ce91ed4618958019ddc52490ed
BLAKE2b-256 9cfa1448d4a2855448b3be4d1dd29f6ac8b9149b659e2b1b1d34d3ee1c29196e

See more details on using hashes here.

Provenance

The following attestation bundles were made for docx_trackdiff-1.0.0.tar.gz:

Publisher: publish.yml on stephenlzc/docx-trackdiff

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file docx_trackdiff-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: docx_trackdiff-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for docx_trackdiff-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d3d65d99abd58de8917f82a979146a0dbf9df6ace7be5cceca66493abd312f95
MD5 a41408b3f6ad12a243ad937acbbf8327
BLAKE2b-256 d116125305edb14a5ebb4ec26a7ad10ca332d5a48a0f7001006fa15301fa8a0a

See more details on using hashes here.

Provenance

The following attestation bundles were made for docx_trackdiff-1.0.0-py3-none-any.whl:

Publisher: publish.yml on stephenlzc/docx-trackdiff

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page