database := "db/games.rec" # show all commands default: just -l --unsorted # how many games played played: recsel -e "Role = 'Player'" -P Module {{database}} # how many games ran ran: recsel -e "Role = 'DM'" -P Module {{database}} # ongoing ongoing: recsel -e 'Status = "Ongoing"' -p System,Module {{database}} # export csv csv: rec2csv {{database}} # get some json json: rec2csv {{database}} | csvjson | jq # create a new entry new: node bin/cli.js # featuring descending sort! markdown: recsel -S Updated {{database}} | rec2csv | csvjson | jq 'reverse | map(.Notes |= gsub("\n"; "\n\n"))' | in2csv -f json | csv2rec | recfmt -f templates/markdown.template # html out html: just markdown | pandoc -t html --toc -s --metadata title="Games!" --metadata toc-title="Index" -B templates/before.html -A templates/after.html -H templates/header.html -o dist/index.html # rss feed feed: echo "gamelog" > dist/feed.xml echo "http://tilde.town/~dozens/gamelog/index.htmlall the games i play" >> dist/feed.xml recsel {{database}} | recfmt -f templates/feed.template >> dist/feed.xml echo '' >> dist/feed.xml sed -i '' 's/&/and/g' dist/feed.xml # copy to blog export: just html && cp dist/index.html ../dozens-and-dragons/out/gamelog/ # DO THE THANG build: html feed # upload up: build export rsync -azP --exclude=.git dist/* tilde:public_html/gamelog