set quiet # show all recipes default: just --list --unsorted # compile binary [group('build')] compile: fennel --compile-binary src/main.fnl tbls /usr/local/lib/liblua.a /usr/local/include/lua5.4 alias build := compile # install all [group('install')] install: install-plugin install-binary # install vim plugin [group('install')] install-plugin: cp -r vim-tbls/* ~/.config/nvim # install binary [group('install')] install-binary: compile cp tbls ~/bin # run all tests [group('test')] test: test-main test-story # run test file [group('test')] test-story: fennel test/story.test.fnl # test main [group('test')] test-main: for i in $(seq 1 10); do fennel src/main.fnl -i test/morpheme-word-epithet.txt -k name; done # build all docs [group('docs')] docs: deps readme # build readme [group('docs')] readme: m4 doc/src/readme.m4 > README.md # create dependency graph [group('docs')] deps: ag require src \ | sed 's/\(.*\.fnl\).*require :\([^\.]*\)\.\([^)]*\)).*/"\1" -> "\2\/\3.fnl"/' \ | awk 'BEGIN { print "digraph {" } { print } END { print "}" }' \ | dot -Tpng \ > doc/deps.png # create dependency graph but sixel [group('docs')] depsxl: ag require src \ | sed 's/\(.*\.fnl\).*require :\([^\.]*\)\.\([^)]*\)).*/"\1" -> "\2\/\3.fnl"/' \ | awk 'BEGIN { print "digraph {" } { print } END { print "}" }' \ | dot -Tpng \ | magick - -geometry 800 sixel:- # bump version [group('docs')] bump: #!/usr/local/bin/bash currname=$(recsel doc/v/meta.rec -P version) currnum=$(recsel doc/v/versions.rec -e "Name = '$currname'" -P Number) nextnum=$((currnum + 1)) nextname=$(recsel doc/v/versions.rec -e "Number = $nextnum" -P Name) echo "Bumping version from $currname to $nextname:" recset doc/v/meta.rec -f version -s $nextname recset doc/v/meta.rec -f updated -S $(gdate +'%Y-%m-%d') recsel doc/v/meta.rec # show full metadata [group('docs')] meta: awk 'FNR==1{print ""}{print}' doc/v/*.rec | recsel -t meta -j version