A converter from RML to ODT.
Project description
This library implements a converter from Reportlabs RML format to Libreoffices/Open Document Formats ODT format utilizing the z3c.rml parser and odfpy library.
It’s developed by Shoobx (https://shoobx.com) but is open source, and we are happy to accept outside contributions. See DEVELOPMENT.rst for more information.
Installing
Install with:
$ pip install shoobx.rml2odt
Usage
There is three ways of using shoobx.rml2odt.
From the command line
Installing shoobx.rml2odt will install a script that can be used from the command line:
rml2odt <infile> <outfile>
Converting files from Python
You can import shoobx.rml2odt as a library and convert files from Python:
>>> from shoobx.rml2odt import rml2odt >>> rml2odt.convertFile(infilepath, outfilepath)
which will convert the file at infilepath and create the ODT file at outfilepath.
Converting an RML string in Python
If your RML data isn’t in a file, but is held in a string, you can import shoobx.rml2odt as a library and convert text data from Python:
>>> from shoobx.rml2odt import rml2odt >>> odt_data = rml2odt.convertFile(infilepath, outfilepath) >>> with open(outputfile, 'wb') as output: ... output.write(odt_data)
CHANGES
0.2.0 (2017-12-08)
Cleaned up the public API.
Added basic docs.
0.1.0 (2017-11-21)
Basic Support for:
Flowables: para, blockTable, hr, ul, ol
Stylesheets: paraStyle
Page Layout
Initial Release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file shoobx.rml2odt-0.2.0.tar.gz.
File metadata
- Download URL: shoobx.rml2odt-0.2.0.tar.gz
- Upload date:
- Size: 99.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
458a5eafb426f6f44c146a997a77a4e3ff7723385637db276866194d853e8774
|
|
| MD5 |
a144d4a311f58571864d49cc0e71d2f7
|
|
| BLAKE2b-256 |
1b5dd9f38fe8ed4a52ac7fa1827d1ea8a6b3b8ececa471428fcb427dcd2cc541
|