Need help extracting text out of All of Office document types.. Or convert them to PDF as can easily extract using pdftotext.
A Bash or Python Script would help too.
|
|
|
Catdoc can convert doc,xls & ppt to text. Second option would be wvWare. For more utils check check http://www.linux.com/archive/articles/52385 for word to text coverters and |
|||||||||
|
|
Abiword can convert from the commandline between any file formats it knows. Convert from Word to plain text:
Make a pdf from a Word file:
And so on. The results in these cases would be myfile.txt or myfile.pdf. If you want to specify the output name you can do that too:
Convert ODT to Word:
Convert Word to ODT:
In fairness to other answers, it should be noted that AbiWord uses wvWare to handle Word documents, but even the wvWare homepage recommends using AbiWord instead for most conversions. I hate word processors. This is the main reason I have AbiWord installed. You might also be interested in unoconv, which is a similar tool supporting formats OpenOffice knows (which would include spreadsheets and the like), but I have no experience with it personally. |
||||
|
|
|
You could use CUPS ( virtual printer ) and by using ld. |
|||
|
|
wv is one option and IIRC OpenOffice can be told from the command line to export as pdf and exit. |
|||
|
I finally found the perfect tool for scripting document parsing , it is apache-tika , it can parse gazillion non-text formats into text which is very cool! Get apache Tika here : |
|||
|
|
|
If you want to use Apache Tika in a Python project, please check out this blog post. |
|||
|
|
|
With LibreOffice you can do:
|
||||
|
|
|
1.doc catdoc or antiword for doc files to convert you can use the following command catdoc file.doc > file or antiword file.doc > file
|
|||
|
|
Docsplit is the perfect tool to extract the text from pdf. It's a ruby gem. So you should install the ruby and gem in your linux system before using the docsplit command. If your system didn't have the ruby and gem, please follow the instruction. You must be root to install the software (assuming you want it to be available to all users). Install the ruby on linux : yum install ruby tar xzf rubygems-x.x.xx.tgz Now that RubyGems is installed, you should have the gem command (gem is the command used to interact with the RubyGems package system). Test it out by running: gem list Now, move to next step, to install the docsplit gem, please goto the following site. http://documentcloud.github.com/docsplit/ |
|||
|
|