GithubHelp home page GithubHelp logo

bumeichen / extdiff Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fornever/extdiff

0.0 0.0 0.0 8 KB

Compare documents using MS Word from the command line.

License: MIT License

PowerShell 89.66% Batchfile 10.34%

extdiff's Introduction

ExtDiff Status Aquana

This is a small command line script that will compare two files using Microsoft Word file comparison tool. Microsoft Word will be started using COM automation.

It is useful as a diff tool for Word-related file types.

Using via command line

To run the script, execute it through PowerShell like this:

$ powershell -File Diff-Word.ps1 oldfile.docx newfile.docx

Or via the batch file:

$ diff-word.cmd oldfile.docx newfile.docx

Using via Git Integration

You can also use this tool with git, so that git diff will use Microsoft Word to diff *.docx files.

To do this, you must configure your .gitattributes and .gitconfig to support a custom diff tool.

.gitattributes

To configure your .gitattributes, open or create a file called .gitattributes in your git repo's root directory. Add the following text to a new line in this file:

*.docx diff=word

It is also possible to create a global .gitattributes file that will be applied to every repository in a system. To do that, create a file .gitattributes in your home directory, and then perform the following command:

git config --global core.attributesfile ~/.gitattributes

.gitconfig

To configure your .gitconfig, open or create the file in your home directory. Then, add the following to your .gitconfig:

[diff "word"]
	command = <pathToExtDiffFolder>/diff-word-wrapper.cmd

Replace <pathToExtDiffFolder> with the path to this repo's location on disk.


Idea taken from TortoiseSVN diff-doc script.

extdiff's People

Contributors

fornever avatar jonmseaman avatar jtpereyda 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.