44 lines
1.1 KiB
Markdown
44 lines
1.1 KiB
Markdown
|
# Rolldown
|
||
|
|
||
|
> Rolling dice in markdown!
|
||
|
> Can it be done??
|
||
|
|
||
|
watch the video:
|
||
|
|
||
|
<https://tube.tchncs.de/w/wvdZ36y4C4FFKNDf2MSBrn>
|
||
|
|
||
|
this repo contains:
|
||
|
|
||
|
```
|
||
|
.
|
||
|
├── README.md
|
||
|
├── db.rec
|
||
|
├── justfile
|
||
|
├── macros.m4
|
||
|
└── story.md
|
||
|
```
|
||
|
|
||
|
1. README.md -- this file
|
||
|
2. db.rec -- a 'recfile' containing one record per possible outcome of rolling 2d6 based on a loose interpretation of the Powered By The Apocalypse system
|
||
|
3. justfile -- just a collection of scripts
|
||
|
4. macros.m4 -- an m4 macros file. no longer used, but preserved for historical value
|
||
|
5. story.md -- a daring story about love, danger, and potatoes
|
||
|
|
||
|
other goodies:
|
||
|
|
||
|
- tmux: `tmux send-keys` allows you to send arbitrary key strokes to other tmux panes. In the video, I used it to tell lynx to refresh itself each time the html file is recompiled.
|
||
|
|
||
|
- snippets: here's the snippet i ended up using to roll the dice:
|
||
|
|
||
|
snippet res "roll 2d6!"
|
||
|
`recsel -P result -m 1 db.rec`
|
||
|
endsnippet
|
||
|
|
||
|
more reading:
|
||
|
|
||
|
- https://www.gnu.org/software/recutil/
|
||
|
- https://mbreen.com/m4.html
|
||
|
- http://eradman.com/entrproject/
|
||
|
- https://github.com/SirVer/ultisnips
|
||
|
|