Re: [msysGit] [PATCH 1/2] contrib: Add diff viewing capability for Microsoft Word documents

Previous thread: none

Next thread: Relating to some syntax error in the gitk script by Ritwik Ghosh on Thursday, September 27, 2007 - 8:22 am. (1 message)
To: <msysgit@...>, <git@...>
Cc: Johannes Sixt <johannes.sixt@...>
Date: Thursday, September 27, 2007 - 7:45 am

A shell script opens WinWord with the documents and a document template.
The document template contains a VBA macro that is run automatically.
It looks up the two documents and performs the comparison.

Unfortunately, the user's help is needed to construct the document template
with the macro from a plain text file, so we print the instructions from
the Makefile.

The README file contains instructions how to use this feature.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
Ok, here's something that shows how git helps solve REAL PROBLEMS.

I've been using this for a day or two now with the MinGW port.
Other Windows prisoners might be interested, too.
Be sure to read the README and take a deap breath of the
fresh air.

;)

This was only tested with a localized version Microsoft Office 2000,
so your milage may vary.

-- Hannes

contrib/winword/diff/.gitignore | 2 +
contrib/winword/diff/Makefile | 39 ++++++++++++++++++++++++++++++++++
contrib/winword/diff/README | 34 +++++++++++++++++++++++++++++
contrib/winword/diff/winworddiff.bas | 13 +++++++++++
contrib/winword/diff/winworddiff.sh | 15 +++++++++++++
5 files changed, 103 insertions(+), 0 deletions(-)
create mode 100644 contrib/winword/diff/.gitignore
create mode 100644 contrib/winword/diff/Makefile
create mode 100644 contrib/winword/diff/README
create mode 100644 contrib/winword/diff/winworddiff.bas
create mode 100755 contrib/winword/diff/winworddiff.sh

diff --git a/contrib/winword/diff/.gitignore b/contrib/winword/diff/.gitignore
new file mode 100644
index 0000000..f37a3c4
--- /dev/null
+++ b/contrib/winword/diff/.gitignore
@@ -0,0 +1,2 @@
+winworddiff
+winworddiff.dot
diff --git a/contrib/winword/diff/Makefile b/contrib/winword/diff/Makefile
new file mode 100644
index 0000000..61de940
--- /dev/null
+++ b/contrib/winword/diff/Makefile
@@ -0,0 +1,39 @@
+prefix = $(HOME)
+bindir = $(prefix)/bin
+datadir = $(prefix)/share/winworddiff
+
+W...

To: Johannes Sixt <johannes.sixt@...>
Cc: <msysgit@...>, <git@...>
Date: Thursday, September 27, 2007 - 8:04 am

Hi,

AFAICT this would be better written as $(PROGRAMFILES) (but you have to
add proper quoting, I guess).

Or, alternatively, you can get it with a simple Tcl script

package require registry 1.0
puts [regsub "\\" [registry get \
"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Extensions" \
"doc"] "/"]

Or something like that.

Ciao,
Dscho

-

To: <msysgit@...>, <git@...>
Cc: Johannes Sixt <johannes.sixt@...>
Date: Thursday, September 27, 2007 - 7:45 am

Since we do not find the path to winword.exe automatically, but rely on
what the user has told us, we better check the path for plausibility.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
contrib/winword/diff/Makefile | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/contrib/winword/diff/Makefile b/contrib/winword/diff/Makefile
index 61de940..91b9328 100644
--- a/contrib/winword/diff/Makefile
+++ b/contrib/winword/diff/Makefile
@@ -1,3 +1,4 @@
+# You can override any of these from ../../../config.mak
prefix = $(HOME)
bindir = $(prefix)/bin
datadir = $(prefix)/share/winworddiff
@@ -8,6 +9,9 @@ INSTALL = install
all: winworddiff winworddiff.dot

winworddiff: winworddiff.sh
+ifndef FORCE
+ exec < "$(WINWORDEXE)" # check existence; override with 'make FORCE=1'
+endif
sed -e 's|@@WINWORDEXE@@|$(WINWORDEXE)|' \
-e 's|@@PREFIX@@|$(prefix)|' \
< $@.sh > $@
--
1.5.3.3.gcc9e

-

Previous thread: none

Next thread: Relating to some syntax error in the gitk script by Ritwik Ghosh on Thursday, September 27, 2007 - 8:22 am. (1 message)