Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
unoconv converts any document format that LibreOffice can import, to any document format that LibreOffice can export. unoconv uses the LibreOffice's UNO bindings for non-interactive conversion of documents. unoconv tries to start an ooffice instance (if it cannot find a running one) that it then uses and destroys. However the success rate of starting and stopping this ooffice instance depends on some outside factors. Since there is no feedback mechanism to see if the newly started ooffice is in fact ready to communicate, we don't know exactly when we can use the UNO api. By default unoconv waits for 3 seconds, but you can specify another delay with -T/--timeout. If ooffice is not ready, you may get a random error. However, you can always start an instance yourself at the default port 2002 (or specify another port with -p/--port) and then use unoconv until you're finished using it and then stop it. unoconv --listener & sleep 20 unoconv -f pdf *.odt unoconv -f doc *.odt unoconv -f html *.odt kill -15 %- Also possible is to use a listener or LibreOffice instance that accepts connections on another system and use it from unoconv remotely. This way the conversion tasks are performed on a dedicated system instead of on the client system. Since LibreOffice 2.3 you do not need an X display for starting ooffice. However you may need the openoffice.org-headless package from your distribution. Since LibreOffice 2.4 nothing special is needed, running in headless mode does not require X. For any older LibreOffice releases, remember that ooffice requires an X display, even when using it in headless mode. One solution is to use Xvfb to create a headless X display for ooffice. http://www.oooforum.org/forum/viewtopic.phtml?t=11890 http://www.wonko.be/2008/01/09/running-openoffice-headless-on-debian http://ward.vandewege.net/writings/200510auto_doc_conv/ http://www.artofsolving.com/node/10 Also beware that the pyuno python module needs to be compiled with the exact same version of python that you are using to load it. A lot of people that run into problems loading pyuno are actually using a precompiled LibreOffice that they downloaded somewhere and is incompatible with their python version. (Sometimes the LibreOffice comes with its own python wrapper.) Other tools that are useful or similar in operation: + Text based document generation http://www.methods.co.nz/asciidoc/ + DocBook to OpenDocument XSLT http://open.comsultia.com/docbook2odf/ + Simple (and stupid) converter from OpenDocument Text to plain text http://stosberg.net/odt2txt/ + Another python tool to aid in converting files using UNO http://www.artofsolving.com/files/DocumentConverter.py http://www.artofsolving.com/opensource/pyodconverter --- Please send me improvements to this document.