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