Created
January 3, 2026 23:39
-
-
Save Lucent/5009028861d523564089e2306ce19c14 to your computer and use it in GitHub Desktop.
tweets.js from Twitter export displayed as plain text prefixed with date/time
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
| #!/usr/bin/env bash | |
| set -Eeuo pipefail | |
| sed '1 s/^[^[]*\[/[/' "$1" | | |
| jq -r ' | |
| def sortable_date: | |
| .tweet.created_at | |
| | strptime("%a %b %d %H:%M:%S %z %Y") | |
| | mktime | |
| | . - 18000 | |
| | strftime("%Y-%m-%d %I:%M%p"); | |
| map(.tweet.sortable_date = sortable_date) | |
| | sort_by(.tweet.sortable_date) | |
| | .[].tweet | |
| | "\(.sortable_date): \(.full_text | gsub("\n"; "|"))" | |
| ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment