ulif.openoffice.xmlrpc – XMLRPC components

Components to convert documents via XML-RPC.

New in version 1.1.

class ulif.openoffice.xmlrpc.WSGIXMLRPCApplication(cache_dir=None)

WSGI application to handle requests to the XMLRPC service.

This WSGI application acts like the Python standard SimpleXMLRPCServer but processes WSGI requests instead and does not fiddle around with raw HTTP.

The passed in cache_dir is used only if set.

convert_locally(src_path, options)

Convert document in path.

Expects a local path to the document to convert.

The options are a dictionary of options as accepted by all converter components in this package.

The cache (if set) will be updated.

Returns path of converted document, a cache key and a dictionary of metadata. The cache key is None if no cache was used.

get_cached(cache_key)

Get a cached document.

Retrieve the document representation stored under cache_key in cache if it exists. Returns None otherwise.