Created
August 5, 2016 12:40
-
-
Save tdhopper/fccc4ab00a07cb290f1812d8ac5cc5f3 to your computer and use it in GitHub Desktop.
Find your tweets from this date in earlier years.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find your tweets from this date in earlier years. | |
# OS X's date function doesn't have the required date math capabilities. | |
# This requires GNU date. You can get it on OS X with `brew install coreutils` | |
GDATE=/usr/local/bin/gdate | |
USERNAME=realDonaldTrump | |
export URL="https://twitter.com/search?q=from%3A$USERNAME%20(" | |
for yearsago in {1..12}; do | |
# echo $URL | |
URL=$URL"(since%3A"$($GDATE '+%Y-%m-%d' -d "$yearsago year ago")"%20until%3A"$($GDATE '+%Y-%m-%d' -d "$($GDATE '+%Y-%m-%d' -d "$yearsago year ago") 1 day")")%20OR%20"; | |
done; | |
open $URL")" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On 2016-08-05, this will open:
https://twitter.com/search?q=from%3ArealDonaldTrump%20((since%3A2015-08-05%20until%3A2015-08-06)%20OR%20(since%3A2014-08-05%20until%3A2014-08-06)%20OR%20(since%3A2013-08-05%20until%3A2013-08-06)%20OR%20(since%3A2012-08-05%20until%3A2012-08-06)%20OR%20(since%3A2011-08-05%20until%3A2011-08-06)%20OR%20(since%3A2010-08-05%20until%3A2010-08-06)%20OR%20(since%3A2009-08-05%20until%3A2009-08-06)%20OR%20(since%3A2008-08-05%20until%3A2008-08-06)%20OR%20(since%3A2007-08-05%20until%3A2007-08-06)%20OR%20(since%3A2006-08-05%20until%3A2006-08-06)%20OR%20(since%3A2005-08-05%20until%3A2005-08-06)%20OR%20(since%3A2004-08-05%20until%3A2004-08-06)%20OR%20)