laerreal / winword-merge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MS Office Word Merging Helper

The script winword-merge.py automates merging MS Word documents which are managed by Git. It is designed to be used as a Nautilus (the Ubuntu Linux Unity file explorer) script (~/.local/share/nautilus/scripts). The script is to be applied (through popup menu) to a document which is being merged. I.e. a git merge command was executed and a conflict with the document is issued. The script launches MS Word document merging UI using a self-generated Visual Basic script (macros). A user must have Wine (Windows environment emulator) with MS Word installed. Also, the user definitely must check WINEPREFIX variable on the top of the script ( google what is WINEPREFIX).

This script may be used standalone (without Nautilus).

cd /path/to/directory/managed/by/git
winword-merge.py conflicting/document.doc

Comparison

Given 2 documents the script launches MS Word document comparison.

Nautilus

Select two files and use the script. Note that the order is significant and may be affected by selection of file sorting criteria (Name, Size, etc.).

File selection order is seems to do not affect the order of arguments passed to the script.

Standalone

cd /path/to/a/directory/
winword-merge.py old.doc new.doc

Debugging

There is DEBUG variable in the script. Less value results in more prints.

Testing

The script was tested in next environment:

  • Ubuntu Linux 16.04 64-bit
  • wine-1.6.2
  • 32-bit wine prefix
  • MS Word 2007

About


Languages

Language:HTML 89.2%Language:JavaScript 7.4%Language:Python 2.6%Language:Shell 0.6%Language:Visual Basic 0.2%