quest/justfile
Christopher P. Brown 1069ee6e13 🛠 macros
added macros basically in order to add a reading time to the page. might
use it for other stuff later, but that's what i want it for now.

according to https://thereadtime.com/ the words-per-minute reading rate
for reading out loud is 183. And the average speed for reading silently
is 234 wpm. which is what we use here.

if you ever want to adjust this rate, edit zxWPM in macros
2022-10-06 07:36:27 -06:00

72 lines
1.8 KiB
Makefile

# show all commands
default:
just --list --unsorted
# build referee facing html
spoilers:
cat basement.order \
| xargs pandoc -f markdown -t markdown \
| m4 macros - \
| pandoc \
-t html \
--standalone \
--toc \
--metadata title="BASEMENT QUEST" \
-H includes/styles.html \
> /tmp/spoilers.html && cp /tmp/spoilers.html www/spoilers.html
# build player facing html
public:
cat basement.order \
| xargs -I % pandoc -f markdown -t markdown --template=templates/public.tmpl % \
| m4 macros - \
| pandoc -t html \
--standalone \
--toc \
--metadata title="BASEMENT QUEST" \
-H includes/styles.html \
> /tmp/quest.html && cp /tmp/quest.html www/index.html
# build rss
rss:
#!/bin/sh
echo "Building xml file!!"
echo "<?xml version=\"1.0\" ?>" > www/rss.xml
echo "<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">" >> www/rss.xml
echo " <channel>" >> www/rss.xml
echo " <atom:link href=\"https://tilde.town/~dozens/quest/rss.xml\" rel=\"self\" type=\"application/rss+xml\" />" >> www/rss.xml
echo " <title>BASEMENT QWEST</title>" >> www/rss.xml
echo " <link>https://tilde.town/~dozens/quest/rss.xml</link>" >> www/rss.xml
echo " <description>Friends having ADVENTURES! Huzzah!</description>" >> www/rss.xml
fd . 'src/' -e md -x pandoc -f markdown+autolink_bare_uris --template=templates/feeditem.tmpl >> www/rss.xml
echo " </channel>" >> www/rss.xml
echo "</rss> " >> www/rss.xml
echo "Done building xml file \o/"
# upload
up:
rsync -zaP www/* tilde:public_html/quest/
# copy assets
assets:
rsync -vup assets/* www/
# build public, spoilers, and rss
build: spoilers public rss assets
# watch for changes
watch:
ls src/**/**.md | entr just build
# open index
open:
open www/index.html
# do some writing
dev: open watch
# build and upload
all: build up