Skip to main content

Diff and Merge For Office

Project description

DMFO -- Diff and Merge For Office

badge:pypi-version badge:py-versions pre-commit pre-commit.ci status Code style: black Code style: prettier

This is a set of scripts that enable convenient diff and merge of Office-related file types (currently Word and PowerPoint (diff only)). The office application will be started using COM automation, thus an Office installation is required.

DMFO is LFS compatible.

Important: Legacy PowerShell scripts are located in ps1 and may still be used. However, not all new features will be ported back to the ps1 scripts.

Usage

Installation

Installable with pip or pipx (recommended).

pipx install DMFO

or

pipx install git+https://github.com/lcnittl/DMFO.git

Git Integration

These tools are intended to be used with Git, so that git diff and git merge will use Office applications to compare and "merge" files. Simply configure .gitattributes and .gitconfig to support the DMFO diff and merge driver. Enjoy to diff and merge Office documents by simply running:

> git diff
> git merge

as usual and with any paramter they accept.

.gitconfig

Simply register the diff and merge drivers by running dmfo install (scope can be given by appending system, global, local or worktree, default is global).

Alternatively, add the entries manually to your git config:

[diff "dmfo"]
	name = DMFO diff driver
	command = dmfo diff
	binary = true
[merge "dmfo"]
	name = DMFO merge driver
	driver = dmfo merge %O %A %B %L %P
	binary = true

Make sure that dmfo's path is in your path variable, otherwise prepand dmfo with the executable's path.

.gitattributes

Specify the following drivers in your .gitattributes file (currently DMFO is only supporting Word files):

*.doc diff=dmfo merge=dmfo
*.docx diff=dmfo merge=dmfo
*.ppt diff=dmfo
*.pptx diff=dmfo

CLI

This option might be added at a later time.

Reqirements

  • Git (for Windows)
  • Microsoft Office ([and/or]: Word, Powerpoint)

Platform

In its current implementation, DMFO is suited for Windows 10. Not tested on other platforms.

License

GNU General Public License v3.0 or later

See LICENSE for the full text.

Project details


Download files

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

Source Distribution

DMFO-0.1.0.tar.gz (31.3 kB view hashes)

Uploaded Source

Built Distribution

DMFO-0.1.0-py3-none-any.whl (27.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page