Is there a tool to do this. I've seen some Python/Java tools to automate OpenOffice but has anyone reliably scripted this to do more than one file, and recurse through a folder/directory tree with .doc files in it, placing the converted .txt and .html files next to the original file in its location.
There are two Unix tools I know of:
You could just use
Mac OS X
You can use the same tools, but you'll have to install them using, for example, Homebrew. To do this, enter in the Terminal:
@slhck your solution almost works but the output is to the display / STDOUT with all the files concatenated together. I need individual .txt files as output. Reason is that we're not accounting for the filename in the output.
To work around having to traverse a folder hierarchy If I use Windows search for *.doc and then copy the results to a folder to put them all in one folder flattened, then I can boot into Ubuntu and run the following.
(I have a file/folder recursion piece of code somewhere which I will dig out and add to later if time.) But for now just flattening the file hierachy as above is good enough.
By the way, catdoc works better than antiword because antiword complains some files aren't word docs, these tend to be .doc files with formatting and blocks of text organised as frames within the doc. catdoc seems to convert all of my docs.
catdoc and antiword have very limited file format support, the latest version they understand is Word 2000.
I know you can script LibreOffice to convert any files it understands to text or pdf (this is what MediaGoblin does) but I don't know how exactly to do that.