Simplate template rensder usesd jinja2
Project description
pyrender
jinja2を使った簡単なテンプレートレンダー パッケージングの練習に利用
$ renderj2 --help
Usage: renderj2 [OPTIONS] TEMPLATE_FILE
Rendre Jinja2 tempalte
Options:
-v, --varsfile PATH vars file path for jinja2
-o, --output PATH output file
--loglevel LVL Either CRITICAL, ERROR, WARNING, INFO or DEBUG
[default: INFO]
-h, --help Show this message and exit.
-V, --version Show the version and exit.
使い方
# renderj2 --vars vars.yml template.j2
上記のように実行すると、Jinja2の形式で書かれたtempalte.j2
を
vars.yml
の変数を用いてレンダリングします。
レンダリング結果はデフォルトで標準出力に出力されます。
--output
オプションを指定することで指定のファイルに出力することも可能です。
開発
Require
- python3
- Poetry
テスト
$ poetry poe test
ビルド
$ poetry build
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
renderj2-1.2.2.tar.gz
(3.5 kB
view details)
Built Distribution
File details
Details for the file renderj2-1.2.2.tar.gz
.
File metadata
- Download URL: renderj2-1.2.2.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a83d9d5dc647798c1b41db5245194c4d9157ed385bc55efc77819cf75a2b100b |
|
MD5 | 53eb03cf48931dcc4aaa961f9996646b |
|
BLAKE2b-256 | 627825e6de379799138087405e0a50dba934fe81bf28dff1cc5541e38827c34e |
File details
Details for the file renderj2-1.2.2-py3-none-any.whl
.
File metadata
- Download URL: renderj2-1.2.2-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9939ba41725d8595a54586bef4b67d2835d36376a802dfce1e684e4deb1c1a5a |
|
MD5 | d07d82fae2e7dd921bd3cf4418e2ff79 |
|
BLAKE2b-256 | 6f8276b730af972f15c92adc99f09f157f036b53e818869f514ce003e28607a6 |