ulif.openoffice.client – The Client API

Client components for communications with pyunoservers.

This way we can better make sure to have a solid interface for third-party software.

class ulif.openoffice.client.PyUNOServerClient(ip='127.0.0.1', port=2009)

A basic client to communicate with a running pyunoserver.

convertFileToHTML(path)

Send a request to a running pyuno server to convert to HTML.

The path of the document to be converted is given in path.

The resulting document and all accompanied files (like images, etc.) will reside in a new temporary directory. It is the callers responsibility to remove that directory.

convertFileToPDF(path)

Send a request to a running pyuno server to convert to PDF.

The path of the document to be converted is given in path.

The resulting PDF document will reside in a new temporary directory. It is the callers responsibility to remove that directory.

convertToHTML(filename, data)

Send a request to a running pyuno server to convert to HTML.

The document contents is delivered by data, the filename by filename.

The resulting document and all accompanied files (like images, etc.) will reside in a new temporary directory. It is the callers responsibility to remove that directory.

convertToPDF(filename, data)

Send a request to a running pyuno server to convert to PDF.

The document contents is delivered by data, the filename by filename.

The resulting PDF document will reside in a new temporary directory. It is the callers responsibility to remove that directory.

copyResultToTempDir(sourcepath, result)

Copy the results to a fresh directory.

The source directory will be removed.

This way we make sure that for instance cache directories are not passed to the outside world.

findRegex(filename, data, regex)

Send a request to a running pyuno server to find a regex.

The document contents is delivered by data, the filename by filename.

findRegexInFile(path, regex)

Send a request to a running pyuno server to find a regex in a file.

The path of the document to be searched is given in path.

The resulting matches are returned.

writeFileToTempDir(path)

Copy file path to temporary dir.

Returns the absolute path to the copied file.

writeToTempDir(filename, data)

Write data as file named filename in temporary dir.

Previous topic

ulif.openoffice.cachemanager – A Cache Manager

Next topic

ulif.openoffice.convert – A Document Converter

This Page