Files
zulip/tools/iframe-bot/last-messages-wrapper.sh
Waseem Daher 932d002ff4 Zulip embedded iframe bot.
Currently running for CUSTOMER3, at MIT.

(imported from commit 1c29d3fb3fbf29b9ea633e9fc102e7737eba4fd7)
2013-08-12 17:09:48 -04:00

25 lines
548 B
Bash
Executable File

#!/bin/sh
## For some reason, this doesn't work with a bot user.
#BOT_EMAIL=bot1@customer3.invalid
#API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
BOT_EMAIL=wdaher@gmail.com
API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
STREAMS="event1 hongkong etc"
COUNT=50
mkdir -p output
while true; do
if python show-last-messages --api-key=$API_KEY --user=$BOT_EMAIL --streams="$STREAMS" --count=$COUNT; then
echo "[`date`] Success";
mv output-candidate.html output/zulip.html
touch output/zulip.html
else
echo "[`date`] FAILURE";
fi
sleep 30;
done