https://github.com/vicentebolea/bash-templater
๐๐๐Simplest Ever Template Engine (14 lines of BASH)
https://github.com/vicentebolea/bash-templater
awesome bash bpkg bpkg-package minimalist simple templates
Last synced: 8 months ago
JSON representation
๐๐๐Simplest Ever Template Engine (14 lines of BASH)
- Host: GitHub
- URL: https://github.com/vicentebolea/bash-templater
- Owner: vicentebolea
- License: mit
- Created: 2018-07-02T08:29:39.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-05-28T01:52:35.000Z (over 2 years ago)
- Last Synced: 2024-05-21T14:06:13.460Z (over 1 year ago)
- Topics: awesome, bash, bpkg, bpkg-package, minimalist, simple, templates
- Language: Shell
- Homepage:
- Size: 8.79 KB
- Stars: 11
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-tools - bash-templater - Simplest Ever Template Engine (15 lines of BASH) (General Purpose Preprocessor / Snippets Manager)
README
# BASH TEMPLATER [](https://github.com/vicentebolea/bash-templater/actions/workflows/blank.yml)
Simplest Template Engine Ever (Written in BASH)
## TL;DR
Installing:
bpkg install vicentebolea/bash-templater
Using it:
templater vars < file.template
## USE ME
You have this `file.template`:
```markdown
# My template
## Author
- @NAME@ <@EMAIL@>
```
And this `rules` file:
```bash
NAME=LEOPOLDO WINSTON
EMAIL=leothewinston\@leoserver.com
```
You execute this command:
```bash
templater rules < file.template
```
You get this:
```markdown
# My template
## Author
- LEOPOLDO WINSTON
```
## The only rule
Escape the `@` character like `\@` in the rules file.
## INSTALL ME
Use the fantastic BASH package manager BPKG and just:
bpkg install vicentebolea/bash-templater
## AUTHORS
- Vicente Adolfo Bolea Sanchez
## THANKS TO
- https://github.com/bpkg/bpkg