Skip to main content

Python CFFI wrapper for LibreOfficeKit

Project description

A python CFFI wrapper for LibreOfficeKit. Tested with both cpython2 and cpython3, need confirmation but should work fine in pypy too.

Requirements

An installation of LibreOffice >= 4.3.0 is required on the same machine

Installation

pip install pylokit

Example

A basic conversion from a rtf file to a doc:

from pylokit import Office

lo_path = "/path/to/libreoffice/program/dir"

lo = Office(lo_path)
doc = lo.documentLoad("myfile.rtf")
doc.saveAs("myfile.doc")

Same conversion passing an explicit format and filter options:

from pylokit import Office

lo_path = "/path/to/libreoffice/program/dir"

lo = Office(lo_path)
doc = lo.documentLoad("myfile.rtf")
doc.saveAs("myfile.doc", fmt="docx", options="skipImages")

Project details


Release history Release notifications

History Node

0.8.1

History Node

0.8.0

This version
History Node

0.6.0

History Node

0.5.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pylokit-0.6.0.tar.gz (9.1 kB) Copy SHA256 hash SHA256 Source None Jul 20, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page