Skip to content

Instantly share code, notes, and snippets.

@hushin
Last active January 12, 2019 02:16
Show Gist options
  • Save hushin/52223b2278e8d583965f48d85d6468a9 to your computer and use it in GitHub Desktop.
Save hushin/52223b2278e8d583965f48d85d6468a9 to your computer and use it in GitHub Desktop.
backup-twitter
#!/bin/sh
NOW=`date +'%Y-%m-%d-%H%M%S'`
user=hush_in
# tweetsFile="$NOW--$user--tweets.csv"
# retweetsFile="$NOW--$user--retweets.csv"
favoritesFile="$NOW--$user--favorites.csv"
# followingsFile="$NOW--$user--followings.csv"
max=4000
# echo "Backing up tweets..."; t timeline ${user} --csv --number ${max} > "${tweetsFile}"
# echo "Backing up retweets..."; t retweets ${user} --csv --number ${max} > "${retweetsFile}"
echo "Backing up favorites..."; t favorites ${user} --csv --number ${max} > "${favoritesFile}"
# echo "Backing up followings..."; t followings ${user} --csv > "${followingsFile}"
echo "Backed up the following for ${user}'s data"
echo "Done 🎉"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment