Baruch Even's blog

A geeks blog

Wed, 17 Aug 2005

Uncompressed OpenOffice Documents
Category: Contribs

It's a well known fact that OpenOffice documents are just zip files of XML documents. I wanted to be able to keep them in a version control repository and preferred to keep the text files in the VCS instead of the binary zip file, for this I create a small script coffice to compress the text files to a zip file, run OpenOffice and uncompress it back after OOo exits.

This is suboptimal since I need to exit from OpenOffice to be able to commit the file, but it's a quick enough hack.

Another problem is that the XML files are all a single line so normal diffs are meaningless as it is now. One way to deal with it will be to reindent the XML files to a readable form. I'll leave that to another session.

Comments ()