Created
December 29, 2022 12:41
-
-
Save iwootten/23f941173c2ef1570d1e53eb6e389968 to your computer and use it in GitHub Desktop.
Find your Best 10 Tweets with jq
This file contains hidden or 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
# Download your twitter archive | |
# Edit tweets.js into a json array | |
# Run this to find best tweets | |
cat tweets.json | jq '[.[].tweet | { | |
retweets: .retweet_count | tonumber, | |
favourites: .favorite_count | tonumber, | |
text: .full_text, | |
url: "https://twitter.com/<your_twitter_handle>/status/\(.id)" | |
}] | sort_by(.retweets)[-10:]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment