From 1637c73cd06300a00d93867b4a2ab499edb8e430 Mon Sep 17 00:00:00 2001 From: g1n Date: Sat, 3 Jul 2021 14:26:18 +0000 Subject: [PATCH] Add 'tweet' command --- twtxt-c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/twtxt-c b/twtxt-c index 6a6c715..fb69d7e 100755 --- a/twtxt-c +++ b/twtxt-c @@ -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