Skip to content

ayush9h/red-docx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

reddocx

PyPI version Python versions License Status

Lightweight track-changes engine for Microsoft Word (.docx) files using direct XML manipulation.

reddocx provides a minimal and fast way to programmatically add tracked revisions (insertions and deletions) to Word documents without requiring Microsoft Word or heavy document processing libraries.

Installation

  • Default Installation
pip install reddocx
  • UV installation
uv pip install reddocx

Usage

from reddocx.core.document import DocxDocument
doc = DocxDocument('sample.docx')
updated_report = doc.track_replace_words({'original_word':'replaced_word'})
updated_doc = doc.save()

Demo

Before → Original document

After → Track changes applied by reddocx

Features

  • Word-style tracked changes (insert / delete revisions)
  • Paragraph-level word replacement tracking
  • Pure XML processing using lxml
  • No Microsoft Word dependency
  • Lightweight and fast
  • Supports file path, bytes, or memory streams

About

Open Source implementation for track changes in MS Word(.docx)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors

Languages