Convertor for JSON database(s) to MAKO templated outpu
Project description
JSON to MAKO generator
Python script that converts JSON database(s) to any templated output using MAKO templates.
Installing
pip3 install mlx.json_to_mako
Usage
The script takes multiple JSON input files, combines them in a python list, and renders the data through a provided template. No data-parsing functionality is provided by the script: the complexity of ‘interpreting’ the data is done in the MAKO templates.
Example
The usage is explained through an example in the example/ directory.
General use:
json-to-mako --input database.json --template rendering.mako --output rendered.html
Multiple input files
The –input flag can be provided multiple times in order to provide multiple JSON databases. This is explained by the example.
json-to-mako --input database1.json --input database2.json--template rendering.mako --output rendered.html
The multiple JSON databases are appended into a python list. Your MAKO-template needs to incorporate this by e.g. looping over the different databases. See example/ folder for details.
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
Built Distribution
Hashes for mlx.json_to_mako-0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a93c37268751c2d4788200ea3339bf9b98f6b4656844a885138b21d09ac5234e |
|
MD5 | 46a843f46a7a909e03f18b3f320a920a |
|
BLAKE2b-256 | cd82851e7102dae04b28499f70789a8ca9f4f195bcc6d9b25027e9e05505d75c |