Python CFFI wrapper for LibreOfficeKit
Project description
<h1>pylokit</h1>
<p>A python CFFI wrapper for LibreOfficeKit. Tested with both cpython2 and cpython3,
need confirmation but should work fine in pypy too.</p>
<h2>Requirements</h2>
<p>An installation of LibreOffice >= 4.3.0 is required on the same machine</p>
<h2>Installation</h2>
<p><code>bash
pip install pylokit
</code></p>
<h2>Example</h2>
<p>A basic conversion from a rtf file to a doc:
```python
from pylokit import Office</p>
<p>lo_path = "/path/to/libreoffice/program/dir"</p>
<p>lo = Office(lo_path)
doc = lo.documentLoad("myfile.rtf")
doc.saveAs("myfile.doc")
```</p>
<p>Same conversion passing an explicit format and filter options:
```python
from pylokit import Office</p>
<p>lo_path = "/path/to/libreoffice/program/dir"</p>
<p>lo = Office(lo_path)
doc = lo.documentLoad("myfile.rtf")
doc.saveAs("myfile.doc", fmt="docx", options="skipImages")
```</p>
<p>A python CFFI wrapper for LibreOfficeKit. Tested with both cpython2 and cpython3,
need confirmation but should work fine in pypy too.</p>
<h2>Requirements</h2>
<p>An installation of LibreOffice >= 4.3.0 is required on the same machine</p>
<h2>Installation</h2>
<p><code>bash
pip install pylokit
</code></p>
<h2>Example</h2>
<p>A basic conversion from a rtf file to a doc:
```python
from pylokit import Office</p>
<p>lo_path = "/path/to/libreoffice/program/dir"</p>
<p>lo = Office(lo_path)
doc = lo.documentLoad("myfile.rtf")
doc.saveAs("myfile.doc")
```</p>
<p>Same conversion passing an explicit format and filter options:
```python
from pylokit import Office</p>
<p>lo_path = "/path/to/libreoffice/program/dir"</p>
<p>lo = Office(lo_path)
doc = lo.documentLoad("myfile.rtf")
doc.saveAs("myfile.doc", fmt="docx", options="skipImages")
```</p>
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pylokit-0.5.0.tar.gz
(9.0 kB
view details)
File details
Details for the file pylokit-0.5.0.tar.gz
.
File metadata
- Download URL: pylokit-0.5.0.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32a0f497b1aa07b962ff5be4fd1e65cf3278d9bb32d656a3ea62acc823c1ebe9 |
|
MD5 | 5a25e13074778d56724d7adfd7517405 |
|
BLAKE2b-256 | b5fa579afa1904b52645f4a59bd317f48dc3a0f780601f2b537bf01d66477f4e |