]> git.armaanb.net Git - bin.git/commitdiff
add tweet-grab
authorArmaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me>
Tue, 10 Nov 2020 03:06:32 +0000 (22:06 -0500)
committerArmaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me>
Tue, 10 Nov 2020 03:06:32 +0000 (22:06 -0500)
tweet-grab [new file with mode: 0755]

diff --git a/tweet-grab b/tweet-grab
new file mode 100755 (executable)
index 0000000..8e94dc8
--- /dev/null
@@ -0,0 +1,7 @@
+#!/usr/bin/env sh
+FILE=/root/tweets/index.html
+LOGFILE=/root/tweets/cron.log
+> $FILE
+curl https://nitter.net/keshinko | grep tweet-content | head -n 1 | sed -e 's/<[^>]*>//g' -e 's/^[ \t]*\(.*$\)/\1/' >> $FILE
+echo "$(tail -n 1000 $LOGFILE)" > $LOGFILE
+date -R >> $LOGFILE