Add 'tweet' command

This commit is contained in:
g1n 2021-07-03 14:26:18 +00:00
parent 15de17688e
commit 1637c73cd0
1 changed files with 5 additions and 1 deletions

View File

@ -46,9 +46,13 @@ case $1 in
url=${url:-"https://example.com/twtxt.txt"}
printf "[twtxt]\n
nick = %s\n
twtxt = %s\n
twtfile = %s\n
url = %s\n" "$nick" "$twtxt" "$url" >> $config
;;
tweet)
export config=/home/g1n/.config/twtxt/config
printf "%s\t%s\n" "$(date +'%FT%T%:z')" "$2" >> $(awk '/twtfile/ {print $3}' $config)
;;
*)
printf "Work in progress\n" ;;
esac