DESCRIPTION

A server for converting docs from other formats to OOo, generating pdf files, keeping unchangeable snapshots in pdf format, getting and setting metadata. To be used together with ERP5 Document business template, although can be run standalone for any other client application.

Server tested using OOo 2.0.3, and everything seems to work.

It returns a file in a desired format; html files are zipped because they often consist of more than one file.

INSTALLATION:

Patch your SimpleXMLRPCServer.py with this:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=893642&group_id=5470

Install OOo 2.0.3 from RPMs.

SETUP:

Done in /etc/ooodoc/config.py. Important parts are:

- paths to programs

- loadtime - how long it takes for your machine to load an OOo instance; this is important because when it is restarted, a script spawns a new instance and then has to wait before trying to connect

- timeout - when an OOo instance we called does not return for too long, we decide it has crashed; we kill it and start another one. This is the time after which we undertake this drastic action.

USAGE:

Start your OOo instances by running /etc/ooodoc/start.sh

Start the server by running /etc/ooodoc/runserw.sh; check the stdout and log.txt to see what is going on. If necessary, ctrl-c the server and rerun it.

    CAUTION: if one of the OOo instances has been restarted because of a timeout, it dies together with the server!
        so if you restart the server after there has been an OOo restart, rerun the start.py script.

TESTING:

Run test_worker.py to test the main tool.
Run test_server.py to test communication and xmlrpc interface.
Run test_timeout.py to check if the OOo gets properly restarted.

PORTABILITY

Not portable. Almost all the code can be run on any OS, except for the "rebuild" function in pool.py and pid recording in start.py. This is for killing and restarting OOo instance - done in a bit unclean way, but works. I don't know a better way to do that.

BG
