forest/justfile

29 lines
633 B
Plaintext

# show available commands and exit
default:
@just --list --unsorted
# print assembled text to stdout
build:
@find src -name '*.txt' -type f -print0 | sort -nz | xargs -0 m4 macros
# watch for changes and build index.html
watch:
@find src -type f | entr just html
tohtml := "pandoc --toc -s -c static/styles/main.css -H static/head.html -f markdown+simple_tables"
# create index.html
html:
@just build | {{tohtml}} > index.html
# word count
words:
@find src -type f -iname '*.txt' -print0 | xargs -0 wc -w
# clean up artifacts
clean:
@rm index.html
# publish to town
up:
scp index.html tilde:~/public_html/forest/