Code Monkey home page Code Monkey logo

docx-compare's Introduction

docx-compare ๐Ÿ”

Overview

docx-compare is a Python script designed to facilitate the comparison of two Microsoft Word documents in a quick and straightforward manner. Leveraging the power of the python-docx library for parsing Word documents and Git's git-diff utility for comparison, this tool provides a simple yet effective means of identifying differences between two .docx files.

Features

  • Easy Comparison: Quickly compare two Microsoft Word documents.
  • Detailed Diffing: Identify differences at a granular level, including text changes, additions, and deletions.
  • Git Integration: Utilizes Git's git-diff for robust document comparison.
  • Pythonic: Written in Python, making it easily extensible and modifiable.
  • Simple Usage: Minimal setup and intuitive command-line interface.

Prerequisites

Before using docx-compare, ensure you have the following installed:

  • Python 3.x
  • python-docx library
  • Git (for git-diff)

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/docx-compare.git
  2. Install the required dependencies:

    pip install -r requirements.txt

Usage

To compare two Word documents, use the following command:

python compare.py path/to/document1.docx path/to/document2.docx

This command will output a diff folder that contains the textual content of the two documents and two command files that will launch the comparison:

# Windows
diff/compare.bat

# Linux or Mac
. diff/compare.sh

Example

python compare.py document_old.docx document_new.docx
diff/compare.bat

Output:

Compare Output

Made with โค๏ธ by Ignema

docx-compare's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.