A simple label or macro expander
Example use cases:
The supported command line options can be listed using the –help options.
Source code can be found at github.com/rsdoiel/shorthand
The project website is rsdoiel.github.io/shorthand
If the content of the markdown file testdata/report.md was
From the command line you can do something like this
shorthand -e ':bash: @now date' \ -e ":import: @report testdata/report.md" \ -e "@report" \ -e ':exit:' | pandoc -s > testdata/report.html
What this command does is launch the shorthand interpreter and it replaces all occurrences of “@now” in the markdown document with the output from the Unix program date.
The output (before piping to Pandoc) would look something like
Notice that both “@now” are replace with the same date information.
You could also embed the shorthand definitions command straight in the markdown itself. with something like
That makes the command line a little shorter
shorthand testdata/report.md | pandoc -s > testdata/report.html
shorthand can be installed with the go get command.
go get github.com/rsdoiel/shorthand/...