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.

Metadata

Release files for docx-trackdiff 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for docx-trackdiff 1.0.0
File Size Uploaded
docx_trackdiff-1.0.0.tar.gz 12.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for docx-trackdiff 1.0.0
File Interpreter ABI Platform
docx_trackdiff-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.1 kB

Release files / docx_trackdiff-1.0.0.tar.gz

Download URL docx_trackdiff-1.0.0.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0ec02041f15779cbd4f058475c65f2c32096b96e09cb18594ef409767804470a
BLAKE2b-256 checksum
How to use checksums
9cfa1448d4a2855448b3be4d1dd29f6ac8b9149b659e2b1b1d34d3ee1c29196e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.

Transparency log

Release files / docx_trackdiff-1.0.0-py3-none-any.whl

Download URL docx_trackdiff-1.0.0-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3d65d99abd58de8917f82a979146a0dbf9df6ace7be5cceca66493abd312f95
BLAKE2b-256 checksum
How to use checksums
d116125305edb14a5ebb4ec26a7ad10ca332d5a48a0f7001006fa15301fa8a0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release 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