redomino.appytransforms
It registers a new portal transforms that let you dynamically generate odt or ods files for a given template.
This product is based on http://appyframework.org/pod.html
Since it aims to generate native LibreOffice/OpenOffice formats, it is not necessary running libre office in server mode.
This plugin is meant for developers, it could be used for generating dynamic odt/ods files, write a custom PloneFormGen adapter, etc.
Usage
Example:
>>> from zope.component import getUtility
>>> from Products.PortalTransforms.interfaces import IPortalTransformsTool
>>> file_contents = open('your odt file with variables').read() # see redomino/appytransforms/tests/input.odt
>>> portal_transforms = getUtility(IPortalTransformsTool)
>>> converter = portal_transforms.convertTo(target_mimetype='application/vnd.oasis.opendocument.text.transformed',
>>> orig=file_contents,
>>> mimetype='application/vnd.oasis.opendocument.text',
>>> mapper=dict(plone_version='4.3.2-sunny-day-beta'),
>>> )
>>> transformed_odt_contents = converter.getData()
appy.pod’s tips and limitations
Tips and appy.pod’s limitations.
Odt files:
use the “Edit” -> “Changes” -> “Record” in order to display vars
conditional text fields seems to be not supported (as far as I can see), use comments with do text if expr instead
libreoffice does not support comments on single words (see http://ask.libreoffice.org/en/question/5256/comments-in-writer/), so it seems that you’ll have to the only way to
repeating list items, it does not works as expected
Ods files:
don’t use the “Edit” -> “Changes” -> “Record” on ods files!
repeat rows adding a comment on the first cell with “do row for person in persons” and put dynamic content putting into the cell value =”person[‘age’]”
if you want to pass a single variable and displaying it into a single cell use the followind syntax into the cell value =”variable_name” (not as a comment)
appy’s documentation is awful: if you are in trouble trying to get working ODT/ODS templates check out the tests doc https://github.com/redomino/redomino.appytransforms/tree/master/redomino/appytransforms/tests
Tests
Test status:
How to launch tests:
$ ./bin/test -m redomino.appytransforms
Changelog
0.1 (2014-02-24)
First release [davidemoro]
Metadata
Release files for redomino.appytransforms 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| redomino.appytransforms-0.1.zip | 70.0 kB | Without provenance | Details for redomino.appytransforms-0.1.zip |
Release files / redomino.appytransforms-0.1.zip
| Download URL | redomino.appytransforms-0.1.zip |
|---|---|
| Size | 70.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
63ca696575a796cc284990ec393acc904d0c907839f583dcfc2c0962bafbb560
|
|
BLAKE2b-256 checksum How to use checksums |
5f0a99aee4fdc6fbf61e2fed0334019f6dd1ec653d223648523dea611ebb86bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for redomino.appytransforms 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.