twtxt.rec/justfile

40 lines
825 B
Plaintext

# list all commands
default:
just --list --unsorted
# view timeline (CAUTION: slow) #TODO: add author?
timeline:
@curl -s -L $(recsel -t Feed -p Url db.rec | cut -d ' ' -f 2) | grep -v '^#' | sort -r | less
# record a twt
twt txt:
@recins -t Twtxt -f text -v {{txt}} db.rec
@tail -n 3 twtxt.rec
# TODO: publish twts
up:
just out
@echo implement me
# follow
follow author url:
recins -t Feed -f Author -v {{author}} -f Url -v {{url}} db.rec
# unfollow
unfollow id:
recdel -t Feed -e 'Id = {{id}}' db.rec
# write twts to twtxt.txt
out:
@cat header.txt > twtxt.txt
@recsel -t Twtxt db.rec | recfmt -f twtxt.templ >> twtxt.txt
# feed2json
jsonfeed:
recsel -t Feed -p Author,Url db.rec | rec2csv | csvjson | jq
# twt2json
jsontwt:
recsel -t Twtxt -p timestamp,text db.rec | rec2csv | csvjson | jq