A simple tool for rendering templates.
Uses json files, jinja2 templates, and some python to glue it all together in order to allow simple templates to be written and rendered quickly.
$ stt --help
Usage: stt [OPTIONS]
A simple template rendering tool.
Options:
--info-directory DIRECTORY The directory that contains info json files
that will be injected into the template
rendering context. Defaults to './info'
--templates-directory DIRECTORY
The directory that contains template files.
Defaults to './templates'
--output-directory DIRECTORY The directory to write the rendered
templates to. It will be created if it
doesn't exist. Defaults to
'./rendered_templates'
--help Show this message and exit.
See the full documentation at https://simple-template-tool.readthedocs.io
$ git clone https://github.com/bnbalsamo/simple-template-tool.git
$ cd simple-template-tool
- If you would like to install the pinned dependencies, run
pip install -r requirements.txt
- If you would like to install the pinned dependencies, run
$ python -m pip install .
To quickly install + configure a development environment...
Install pyenv, pyenv-virtualenv, and xxenv-latest and copy the following into your terminal while in the repository root.
[[ `type -t pyenv` ]] && \
[ -s "$PYENV_ROOT/plugins/pyenv-virtualenv" ] && \
[ -s "$PYENV_ROOT/plugins/xxenv-latest" ] && \
pyenv latest install -s 3.8 && \
PYENV_LATEST_38=$(pyenv latest -p 3.8) && \
pyenv latest install -s 3.7 && \
PYENV_LATEST_37=$(pyenv latest -p 3.7) && \
pyenv latest install -s 3.6 && \
PYENV_LATEST_36=$(pyenv latest -p 3.6) && \
pyenv virtualenv "$PYENV_LATEST_38" "simple-template-tool" && \
pyenv local "simple-template-tool" "$PYENV_LATEST_38" "$PYENV_LATEST_37" "$PYENV_LATEST_36" && \
pip install -e .[dev,tests,docs]
If you choose not to use the quickstart script you will need to...
- Create a virtual environment
- Install the development dependencies
pip install -e .[dev,tests,docs]
- Configure tox so that it can access all relevant python interpreters
$ inv run.tests
$ inv run.autoformatters
$ inv pindeps
Brian Balsamo [email protected]
Created using bnbalsamo/cookiecutter-pypackage v0.34.1