Skip to content

Instantly share code, notes, and snippets.

@dgageot
Created May 16, 2012 15:05
Show Gist options
  • Save dgageot/2711039 to your computer and use it in GitHub Desktop.
Save dgageot/2711039 to your computer and use it in GitHub Desktop.
Say each tweet when it arrives
#!/bin/bash
lines_to_skip=`t timeline | wc -l | sed 's/^ *//g'`
i=0
echo Skipping [$lines_to_skip] lines in the timeline
echo From now on, say each tweet as soon as it arrives...
t stream timeline | while read -r line; do
i=`expr $i + 1`
if [ $i -ge $lines_to_skip ]; then
echo "$line"
say -v Sebastien "$line"
fi
done
@ybonnel
Copy link

ybonnel commented May 24, 2012

What is "t" tool? (for commands "t timeline" or "t stream timeline")

@dgageot
Copy link
Author

dgageot commented May 25, 2012

It's Twitter CLI : https://github.com/sferik/t

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment