Crates.io | blek |
lib.rs | blek |
version | 0.1.0 |
source | src |
created_at | 2021-01-31 15:11:21.274191 |
updated_at | 2021-01-31 15:11:21.274191 |
description | Blek le Rat is a fast, simple template tool for the commandline |
homepage | |
repository | https://git.webschuur.com/berkes/blek |
max_upload_size | |
id | 348910 |
size | 29,279 |
Blek le Rat is a fast, simple template tool for the commandline.
It accepts Jinja2 templates and replaces variables with those you pass along.
invoice.j2
:
Date: {{ date }}
Number: {{ number }}
Dear {{ name | default(value="valued customer") }}, this the invoice for 1 pizza. Please pay ฿{{ amount }}.
$ blek invoice.j2 --var amount=10,000 --var "name=John Doe" --var number=$(openssl rand -base64 6)
Date: 2021-01-29
Number: KqSYp872
Dear John Doe, this the invoice for 1 pizza. Please pay ฿10,000.
Requirements:
TODO: cargo install
TODO: release binaries.
Build from source (TODO how to set up Rust and cargo):
git checkout https://git.webschuur.com/berkes/blek
cd blek
cargo build
After installing, from the place where it is installed:
blek --help
This builds and runs the platform locally.
After downloading the source:
cargo test
This builds and runs the tests locally. There are very few tests, since there are very few features.