No project description provided
Project description
python-odt-template
[!IMPORTANT] This package currently contains minimal features and is a work-in-progress
Table of Contents
Installation
pip install python-odt-template
Usage
from python_odt_template import ODTTemplate
from python_odt_template.jinja import enable_markdown
from python_odt_template.jinja import get_odt_renderer
from python_odt_template.libreoffice import convert_to_pdf
odt_renderer = get_odt_renderer(media_path="inputs")
with ODTTemplate("inputs/simple_template.odt") as template, enable_markdown(template.get_markdown_filter()):
odt_renderer.render(
template,
context={"document": document, "countries": countries},
)
template.pack("simple_template_rendered.odt")
convert_to_pdf("simple_template_rendered.odt", "outputs")
Alternatives
Credits
Thanks to secretary for the enormous amount of integration work on Jinja2 and ODT.
License
python-odt-template
is distributed under the terms of the MIT license.
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
python_odt_template-0.1.0.tar.gz
(199.9 kB
view details)
Built Distribution
File details
Details for the file python_odt_template-0.1.0.tar.gz
.
File metadata
- Download URL: python_odt_template-0.1.0.tar.gz
- Upload date:
- Size: 199.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf755e863866bec1c7b9160a22ae75a09eb377a64aed3528ed5a97e6b675d2c3 |
|
MD5 | b6cab4cf93f0723e1de8ed4356828b6c |
|
BLAKE2b-256 | a034761a1495f2f527f9624bc3c497004729e6ca112c4e319d4e647822da3b38 |
File details
Details for the file python_odt_template-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: python_odt_template-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00dd2a3c55f214bed1b4098127df0aaf7165ea37429e8a8dfbcf075b4bf9d3d0 |
|
MD5 | 289d31196c55956083392825e43f68fd |
|
BLAKE2b-256 | 2b33aa9b3324d4b5d169e458ad97513f49071c334852c6655e7e94f84b3960c7 |