Button Button Button Button

Here is a script to convert OpenDocument files to plain text (formatted using Markdown syntax): odt2txt.py.

Like a true paper-writing nerd I keep going back between Open Office and emacs for word processing. Emacs opens files so much faster and I can then grep and less those files. On the other hand, with Emacs I find that WYSIWIG editing really makes it easier to plan a paper (is it just the pagination?). With this script, I can not ‘less’ OpenOffice documents from the command line:

odt2txt.py MyPaper.odt | less

I still can’t use grep, though. Using odt2txt | less takes less time then opening a file in Open Office, but it still won’t be enough for grepping. I think I would need to set up type kind of caching.