database := "db/games.rec" # show all commands default: just -l --unsorted # how many games played @played: recsel -t Game -e "Role = 'Player'" -P Module -C {{database}} # how many games ran @ran: recsel -t Game -e "Role = 'DM'" -P Module -C {{database}} # ongoing @ongoing: recsel -t Game -e 'Status = "Ongoing"' -p System,Module {{database}} # show all in year year x: recsel -t Game -e 'Updated >> "{{x}}-01-01"' -P "Module,System,Updated" {{database}} alias n := new # create a new game new: cli alias u := update # create a new game update update: cli # start cli cli: sh bin/cli.sh # build da html html: #!/usr/bin/env sh ## BEGIN: TEMPLATES ## gameheadertmpl='

{{{{Module}} ({{{{System}}) #

{{{{Module}} is a game of {{{{System}} that I started playing on {{{{Started}} as a {{{{Role}}. It is a {{{{Format}} {{{{Length}} and is currently {{{{Status}}.

Here is how it went!

' updatetmpl='

{{{{Created}} #

{{{{Text}} ' gamefootertmpl='
🎲🎲
' toctmpl='
  • {{{{Module}} ({{{{System}})
  • ' ## END: TEMPLATES ## exec > dist/index.html ## BEGIN: STYLE ## cat< EOF ## END: STYLE ## ## BEGIN: INTRO ## cat<Gamelogs

    All the roleplaying games I've played.

  • src: https://git.tilde.town/dozens/gamelog
  • dozens webring: previous index next
  • rss
  • EOF ## END: INTRO ## ## BEGIN: TOC ## echo '

    Contents

    ' recsel {{database}} -t Game | recfmt "$toctmpl" ## END: TOC ## ## BEGIN: BODY ## allgames=(`recsel {{database}} -t Game -P Id -C | tr '\n' ' '`) for idx in "${allgames[@]}" do recsel {{database}} -t Game -e "Id = $idx" | recfmt "$gameheadertmpl" recsel {{database}} -t Update -e "Game = $idx" | recfmt "$updatetmpl" | markdown echo $gamefootertmpl done ## END: BODY ## # rss feed feed: #!/usr/bin/env sh feedtmpl=' {{{{Game_System}} - {{{{Game_Module}} http://tilde.town/~dozens/gamelog/index.html {{{{Created}} ' exec > dist/feed.xml cat< gamelog http://tilde.town/~dozens/gamelog/index.html all the games i play EOF recsel -t Update -j Game {{database}} | recfmt "$feedtmpl" echo '' 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 # do everything all: build up