Skip to content

Instantly share code, notes, and snippets.

@jagipson
Last active June 30, 2017 17:27
Show Gist options
  • Save jagipson/f8f690c2f797396ca963e0d720953ad7 to your computer and use it in GitHub Desktop.
Save jagipson/f8f690c2f797396ca963e0d720953ad7 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Script to assemble all trump's tweets in a single JSON file
pushd "$(mktemp -d --tmpdir)" || exit
git clone https://github.com/bpb27/trump_tweet_data_archive.git
cd trump_tweet_data_archive
for n in *.zip; do
unzip $n
done
data=$PWD/twit.json
for n in master*.json; do
cat "$n" >> $data
done
popd
cp $data .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment