Live data from Hacker News

Using Microsoft Word with Git

blog.martinfenner.org

1–10 of 136 posts

Re: Using Microsoft Word with Git

#3
.docx is just an archive format. If I remember correctly the contents inside the .docx archive are plain text. Can’t we just use version control inside of there? We would have to of course figure out a way to have git unpack and pack the archive each time.

Re: Using Microsoft Word with Git

#4

.docx is just an archive format. If I remember correctly the contents inside the .docx archive are plain text. Can’t we just use version control inside of there? We would have to of course figure out a way to have git unpack and pack the archive each time.

You can rename the .docx as .zip, and it unzips into .doc (xml) and folders full of images, etc. (same for .pptx, .xlsx, .etcx)

Re: Using Microsoft Word with Git

#5

.docx is just an archive format. If I remember correctly the contents inside the .docx archive are plain text. Can’t we just use version control inside of there? We would have to of course figure out a way to have git unpack and pack the archive each time.

It’s a zip, that’s not the hard part.

Apart from attachments and metadata the actual document is some kind of xml monstrosity that contains the text and the markup. It’s not very useful to just create diffs from that, it looks a bit like the HTML created by FrontPage if you remember that.

You can just rename a docx file to .zip, unpack it and peek around.

Re: Using Microsoft Word with Git

#6
Not long ago I read some article here on HN that the world is still waiting for a git equivalent for documents. This seems like a good start.

Now we need a native diff viewer for structured files, where the changes are presented with attribution either side by side, or alongside (like gitk, or like gitlab diff viewer).

Then we need an editor that supports doing the gitty stuff natively, so that the non-technical writer doesn't have to worry about creating repos and committing the changes from the command line.

Re: Using Microsoft Word with Git

#7
post #6

Not long ago I read some article here on HN that the world is still waiting for a git equivalent for documents. This seems like a good start. Now we need a native diff viewer for structured files, where the changes are presented with attribution either side by side, or alongside (like gitk, or like gitlab diff viewer). Then we need an editor that supports doing the gitty stuff natively, so that the non-technical writ…

After a lot of trying to get Git and Word to play nice together, we ended up building a collaboration tool to bring the power of Git (branching & merging) to non-technical Word users.

Feedback welcome: https://www.simuldocs.com/

Re: Using Microsoft Word with Git

#8
post #5

.docx is just an archive format. If I remember correctly the contents inside the .docx archive are plain text. Can’t we just use version control inside of there? We would have to of course figure out a way to have git unpack and pack the archive each time.

It’s a zip, that’s not the hard part. Apart from attachments and metadata the actual document is some kind of xml monstrosity that contains the text and the markup. It’s not very useful to just create diffs from that, it looks a bit like the HTML created by FrontPage if you remember that. You can just rename a docx file to .zip, unpack it and peek around.

The XML might be awful for viewing but I do wonder if it would diff better for storage? Git is awfully inefficient for storing binary data.

Re: Using Microsoft Word with Git

#9
Ages ago I wrote a little Word VBA that exported a plaintext copy to go along with the .doc every time I hit save. Worked quite well for eyeballing the changes in a diff. Obviously you don't get merge support for .doc but since that was still running on SVN where workflows tend to be less merge-heavy (or was it still CVS? I feel old..) and I was working solo anyways the human-readable diff worked well enough.

Re: Using Microsoft Word with Git

#10
post #6

Not long ago I read some article here on HN that the world is still waiting for a git equivalent for documents. This seems like a good start. Now we need a native diff viewer for structured files, where the changes are presented with attribution either side by side, or alongside (like gitk, or like gitlab diff viewer). Then we need an editor that supports doing the gitty stuff natively, so that the non-technical writ…

After a lot of trying to get Git and Word to play nice together, we ended up building a collaboration tool to bring the power of Git (branching & merging) to non-technical Word users. Feedback welcome: https://www.simuldocs.com/

Congrtulations, it seems really easy to use. Just one thing: I noticed formatting changes (such as italics) are ignored. Is this deliberate?
Post reply on HN