mirror of
https://github.com/thewesker/greptweet.git
synced 2025-12-22 13:01:06 -05:00
fix tabs in Jamie's code & add modeline
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Twitter backup script - hendry AT iki.fi - please mail me suggestions to make this suckless
|
||||
# http://dev.twitter.com/doc/get/statuses/user_timeline
|
||||
# Known issues:
|
||||
# API only allows 3200 tweets to be downloaded this way :((
|
||||
# Won't work on protected accounts (duh!)
|
||||
# No @mentions or DMs from other accounts
|
||||
# vim: set ts=4 sw=4
|
||||
|
||||
umask 002
|
||||
api="http://api.twitter.com/1/statuses/user_timeline.xml?"
|
||||
@@ -56,13 +51,11 @@ done
|
||||
cat; } < $temp > $temp2
|
||||
} 2>&1 | # redirect back to stdout for grep
|
||||
grep -iE 'rate|status' # show the interesting twitter rate limits
|
||||
# date --date='@1320361995'
|
||||
|
||||
mv $temp2 $temp
|
||||
|
||||
if test $(xmlstarlet sel -t -v "count(//statuses/status)" $temp) -eq 0
|
||||
then
|
||||
|
||||
head $temp
|
||||
if test "$2" && test "$since"
|
||||
then
|
||||
@@ -75,7 +68,6 @@ then
|
||||
fi
|
||||
rm -f $temp $temp2
|
||||
exit
|
||||
|
||||
fi
|
||||
|
||||
xmlstarlet sel -t -m "statuses/status" -n -o "text " -v "text" -m "entities/urls/url" -i "expanded_url != ''" -n -o "url " -v "url" -o " " -v "expanded_url" $temp | {
|
||||
|
||||
Reference in New Issue
Block a user