https://github.com/illotum/roll
Simple text generation utility
https://github.com/illotum/roll
cli cmd go rpg templating
Last synced: about 2 months ago
JSON representation
Simple text generation utility
- Host: GitHub
- URL: https://github.com/illotum/roll
- Owner: illotum
- License: mit
- Created: 2018-01-17T21:19:52.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-19T05:08:17.000Z (over 8 years ago)
- Last Synced: 2025-12-29T23:31:18.296Z (7 months ago)
- Topics: cli, cmd, go, rpg, templating
- Language: Go
- Size: 156 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Roll is a simple template rendering utility geared towards random text
generation.
# Usage
Roll provides extensive help on invocation:
```sh
> roll -h
Usage:
roll FILE [flags]
Flags:
-h, --help help for roll
-s, --seed SEED random number generator SEED (default 1516223506)
```
## Example Input
```toml
template = """
1D100: {{roll "1d100"}}
Coin: {{random .coin}}
AW move
1D{{.aw.Total}}: {{random .aw}}
2d6: {{roll "2d6" | pick .aw}}
"""
[tables]
coin = [
"head",
"tail",
]
aw = [
"6:miss",
"3:hit",
"3:strong hit",
]
```
## Example Result
```sh
> roll example.toml
1D100: 73
Coin: tail
AW move
1D12: miss
2d6: hit
```