# list available commands and exit default: @just --list --unsorted # build rss feed rss: #!/bin/sh exec > feed.xml echo "" echo " " echo " It's Pro Toad and Superb Owl" echo " https://git.tilde.town/dozens/protoadandsuperbowl" echo " It's Pro Toad and Superb Owl!" echo " " echo " /bin/sh" recsel db/database.rec | recfmt -f templates/feed.tmpl echo "" # watch toad.md for changes watch: echo "TODO" alias dev := watch # build markdown comics markdown: #!/bin/sh for ((i = 0; i < $(recsel -c db/database.rec); i++)) do id=$(recsel -P id -n $i db/database.rec) recsel -n $i db/database.rec | recfmt -f templates/page.tmpl | fold -s -w 40 > $id.md done # build gemini gemini: #!/bin/sh for ((i = 0; i < $(recsel -c db/database.rec); i++)) do id=$(recsel -P id -n $i db/database.rec) exec > gemini/$id.gmi echo "# $id" echo recsel -n $i db/database.rec | recfmt -f templates/page.tmpl | fold -s -w 40 echo echo "=> gemini://tilde.town/~dozens/comic" done # build gemini index index: #!/bin/sh exec > gemini/index.gmi echo "# Pro Toad and Superb Owl" echo echo "Two best friends have adventures!" echo recsel db/database.rec \ | recfmt "=> {{{{id}}.gmi {{{{date}} - {{{{id}}---" \ | sed 's/---/\n/g' \ | tail -r echo echo "=> gemini://tilde.town/~dozens/comic" # go gemini upload: rsync -vurp gemini/* $HOME/blogs/gemini/comic # build and rss all: markdown gemini index upload rss # new script new: #!/usr/bin/env sh count=$(recsel -c db/database.rec) read -p "first line: " top read -p "second line: " bottom printf -v id "%05d" $((++count)) recins --verbose -t comic \ -f "top" -v "$top" \ -f "bottom" -v "$bottom" \ -f "id" -v "$id" \ -f "date" -v "$(date -I)" \ db/database.rec