Skip to content

Using YAML formatted data in documents with template support

License

Notifications You must be signed in to change notification settings

cemasirt/DataToDocs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DataToDocs

Using YAML formatted data in documents with template support

Python

This is a simple script that takes a YAML structured data file and creates a document using the data provided. For referencing data in the document Jinja2 templating engine is used. For info on usage and syntax, please visit official Jinja2 website.

Installation

git clone --depth=1 https://github.com/cemasirt/DataToDocs.git
cd DataToDocs
python3 -m venv converter
.\converter\Scripts\activate (OR source bin/activate on Linux)
pip3 install -r requirements.txt

Usage

.\converter\Scripts\python.exe converter.py example_data.yml example_template.html > policy.html
usage: converter.py [-h] data template

This is a simple script that takes a YAML structured data file and creates a document using the data provided.

positional arguments:
  data        YAML data file to be used
  template    templated HTML file to be used

optional arguments:
  -h, --help  show this help message and exit

About

Using YAML formatted data in documents with template support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published