Skip to content

Instantly share code, notes, and snippets.

@iwootten
Created November 12, 2022 18:09
Show Gist options
  • Save iwootten/38ff0208116771b9edc2f8d2bbbbb742 to your computer and use it in GitHub Desktop.
Save iwootten/38ff0208116771b9edc2f8d2bbbbb742 to your computer and use it in GitHub Desktop.
Find your Best Tweets with jq
# 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)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment