Libreoffice files generator programmatically with python and Libreoffice server instances
Project description
UnoGenerator

Description
Python module to generate Libreoffice documents (ODT and ODS) programatically.
Morever, you can export them to (.xlsx, .docx, .pdf) easyly.
It uses Libreoffice uno module, so you need Libreoffice to be installed in your system.
Installation
Only Linux is supported. I'm going to write unogenerator installation methods for some main Linux Distributions
ODT 'Hello World' example
This is a Hello World example. You get the example in odt, docx and pdf formats:
from unogenerator import ODT_Standard
with ODT_Standard() as doc:
doc.addParagraph("Hello World", "Heading 1")
doc.addParagraph("Easy, isn't it","Standard")
doc.save("hello_world.odt")
doc.export_docx("hello_world.docx")
doc.export_pdf("hello_world.pdf")
ODS 'Hello World' example
This is a Hello World example. You'll get example files in ods, xlsx and pdf formats:
from unogenerator import ODS_Standard
with ODS_Standard() as doc:
doc.addCellMergedWithStyle("A1:E1", "Hello world", style="BoldCenter")
doc.save("hello_world.ods")
doc.export_xlsx("hello_world.xlsx")
doc.export_pdf("hello_world.pdf")
Unogenerator scripts
Python unogenerator package has the following scripts:
unogenerator_monitor
Monitors your libreoffice server instances
unogenerator_translation
With this tool you can translate several odt files with one command. It generates .pot and .po files, where you can set your translations. Then run your command again and you'll get your files translated
unogenerator_translation --from_language es --to_language en --input original.odt --input original2.odt --output_directory "translation_original"
You can use --fake to see simulation of your translation
unogenerator_demo
With this tool you can generate a demo, remove its result files and make benchmark comparations in your system
Documentation
You can read documentation in doc directory. It has been created with unogenerator.
Development links
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unogenerator-1.1.1.tar.gz.
File metadata
- Download URL: unogenerator-1.1.1.tar.gz
- Upload date:
- Size: 830.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.4 CPython/3.13.12 Linux/6.19.11-gentoo
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58f220f772a1a21de96f82e395adbe5fa825e38d8f4352100304568583128106
|
|
| MD5 |
750eca1cb58d0ff56e339041a4c36dc1
|
|
| BLAKE2b-256 |
d76949a6621de54980b8be79833a3f716361ab7ace839550d134efdf23b6c718
|
File details
Details for the file unogenerator-1.1.1-py3-none-any.whl.
File metadata
- Download URL: unogenerator-1.1.1-py3-none-any.whl
- Upload date:
- Size: 849.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.4 CPython/3.13.12 Linux/6.19.11-gentoo
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e02000e45cc27b13cfd9bdb18cde6fab05906e5378e085c5aca94aff1a7ef776
|
|
| MD5 |
9b51bb0b9444b6c0129e4a5bca5516e8
|
|
| BLAKE2b-256 |
733b4e835224ad47d023ce68d6950e44b2a3ad0ce9d73cc150498778dddf492d
|