--- /dev/null
+#!/usr/bin/env sh
+# Grabs a tweet form a user and display it. Avoids using the twitter
+# API by scrapping a nitter instance, which can easily be scraped,
+# unlike the intentionally crippled twitter.com. Powers
+# https://ishaan.bhojwani.org
+
+INSTANCE=${INSTANCE:-https://nitter.fdn.fr}
+USER=${USER:-keshinko}
+
+printf "Content-type: text/plain\n\n"
+curl -s "$INSTANCE/$USER" | grep tweet-content | head -n 1 \
+ | sed -e 's/<[^>]*>//g' -e 's/^[ \t]*\(.*$\)/\1/'
+++ /dev/null
-#!/usr/bin/env sh
-# Grabs tweets and writes them to a file. Avoids using the twitter API by
-# scrapping nitter.net (or any other nitter instance) which can easily be
-# scraped, unlike the intentionally crippled twitter.com. See the output of
-# this script at https://ishaan.bhojwani.org
-
-FILE=/root/tweets/index.html
-LOGFILE=/root/tweets/cron.log
-INSTANCE=https://nitter.fdn.fr
-
-curl $INSTANCE/keshinko | grep tweet-content | head -n 1 \
- | sed -e 's/<[^>]*>//g' -e 's/^[ \t]*\(.*$\)/\1/' > $FILE
-date -R > $LOGFILE