Browse Source

Add README

tags/0.1.0^2
Bèr Kessels 3 months ago
parent
commit
624b82d89d
1 changed files with 60 additions and 0 deletions
  1. 60
    0
      README.md

+ 60
- 0
README.md View File

@@ -0,0 +1,60 @@
# Blek

Blek le Rat is a fast, simple template tool for the commandline

It accepts [Jinja2](https://jinja.palletsprojects.com/en/2.11.x/)
templates and replaces variables with those you pass along.

`invoice.j2`:
```
Date: {{ date }}
Number: {{ number }}
Dear {{ name }}, this the invoice for 1 pizza. Please pay ฿{{ amount }}.
```

```
$ blek invoice.j2 --var "name=John Doe" --var number=$(openssl rand -base64 6) --var amount=10,000
Date: 2021-01-29
Number: KqSYp872
Dear John Doe, this the invoice for 1 pizza. Please pay ฿10,000.
```

## Features

* Simple, fast, small.
* Binary. Just download and run (or compile and distribute)
* Jinja2: a very simple, well documented templating language.
* Any file can be a template.
* Comes with ever growing set of basic variables (currently 2... 😋)
* Unix philosophy; very easy to automate or use in automation.

## Quickstart

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

### Run

After installing, from the place where it is installed:

blek --help

This builds and runs the platform locally.

### Test

After downloading the source:

cargo test

This builds and runs the tests locally. There are very few tests, since
there are very few features.

Loading…
Cancel
Save