bloodmoongate/groff/justfile

27 lines
419 B
Plaintext
Raw Normal View History

2023-09-27 12:06:00 +00:00
src := 'src/story.ms'
builddir := 'out'
# show all commands
default:
just --list --unsorted
# groff to text
text:
groff -Tutf8 -ms {{src}} \
| sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" \
> {{builddir}}/story.txt
# groff to pdf
pdf:
groff -Tpdf -ms {{src}} \
> {{builddir}}/story.pdf
# watch for changed, build pdf
watchpdf:
ls {{src}} \
| entr -c -r just pdf
# remove build files
clean:
rm {{builddir}}/*