tempered
[Index] Package maintainers For package maintainers and hackage trustees Candidates A dead-simple templating utility for simple shell interpolation. Use at your own risk and only on trusted templates. Here's a simple use-case: Then we can render the template with tempered ./post.md to get: If you want you can add a shebang to the top of your template and just run it as an executable, tempered will strip the shebang for you automagically: test.txt Examples Here Mac and Linux binaries are provided HERE; If you're familiar with Haskell Stack: There's really not much to it; parses the file and runs anything inside {{ }} as a shell expression and pipes stdout into its spot. If you're clever you can do pretty much anything you want with this. Sure; It's bash. You can set up environment overrides in env.yaml, tempered looks up through the file-system to find an env.yaml from the cwd NOT the template location. Here's an example env.yaml; we can do simple strings or commands here; just make sure to quote any entries that start with {{ or the YAML parser gets mad. env.yaml Then you can use them just like normal variables. It's bash; go for it: output: Chances are you're forgetting to echo an env-var; {{ $TITLE }} will try to run the contents of $TITLE as a command, you want {{ echo "$TITLE" }}. Probably.
hackage.haskell.org
0.2.0
almost 9 years ago
2
1,702 total
1
Links
| Registry | hackage.haskell.org |
| Source | Repository |
| Homepage | Homepage |
| JSON API | View JSON |
| CodeMeta | codemeta.json |
Package Details
| PURL |
pkg:hackage/tempered
spec |
| License | BSD-3-Clause |
| First Release | almost 9 years ago |
| Last Synced | 8 days ago |
Repository
| Stars | 32 on GitHub |
| Forks | 0 on GitHub |