pandoc-blog/justfile

47 lines
926 B
Plaintext
Raw Permalink Normal View History

# show all recipes
default:
just --list
# build
build:
2022-03-12 17:06:34 +00:00
make -B build
2022-03-04 00:00:50 +00:00
# make fred say something
say phrase out:
say -v 'Fred' -r 100 -o {{out}} {{phrase}}
# watch for changes
watch:
ls content/*.md | entr make build
2022-03-04 00:00:50 +00:00
# length <file>
length file:
@wc -c < {{file}} #| cut -d ' ' -f 7
# duration <file>
duration file:
@ffprobe -show_entries stream=duration -of compact=p=0:nk=1 -v fatal {{file}}
# clean dist
clean:
rm -rf dist/*
touch dist/.gitkeep
2022-03-04 00:00:50 +00:00
# upload
up:
rsync -azP dist/ tilde:public_html/podcast
2022-03-29 13:49:36 +00:00
2022-04-04 18:35:36 +00:00
# make this week's emails from data.rec
2022-03-29 13:49:36 +00:00
emails:
#!/bin/bash
echo "{ \"data\":" > tmp.json
2022-04-04 18:35:36 +00:00
recsel -e "date >> '$(gdate)' && date << '$(gdate -d "next week")'" data.rec \
| rec2csv | csvjson >> tmp.json
2022-03-29 13:49:36 +00:00
echo "}" >> tmp.json
mustache tmp.json templates/email.template
rm tmp.json
# show me the letters
letters:
2022-04-11 20:19:12 +00:00
@recsel -t letter -e "answered = 'no'" -P listener,writes letters.rec