EmailTweetor for Linux/Mac/Windows v2020.04.14 adds tweets archiving ability

Also available: A shell script to mass-delete tweets.

Subhash TweetsToRSS can also has the ability to archive tweets but I wanted the ability to use the archive in a shell script.

java -jar emailtweetor.jar dump TwitterUserName [last_status_id]

When used without the last_status_id, EmailTweetor will try to list upto 3200 of the latest tweets from the user. This limit, they say, is for 15 minutes. Upto 1 lakh tweets can be requested in 24 hours. If you specify the ID of the 3200th tweet after 15 minutes, you may be able to proceed further.

The list has three columns – URL, text content and date.

java -jar emailtweetor.jar dump realDonaldTrump > tweets-archive.txt
tail -n +2 tweets-archive.txt | \
  awk 'BEGIN { FS="⁑"; RS="¶"; ORS="" } { print $1 }' \
  > tweets-urls.txt

This command eliminates the first line of the output and prints only the first column containing the tweet URLs.

This URL list can be given to EmailTweetor so that each tweet can be deleted.

cat tweets-urls.txt | read -p sTweet
  java -jar emailtweetor.jar delete $sTweet

I did not create the ability do this within EmailTweetor to prevent accidental destruction of tweets. This way of deleting tweets is much simpler than the obsolescence-prone GreaseMonkey Twitter Deletor.

Archive in spreadsheet

When you paste the output in Calc (LibreOffice), the field separator option should be set to ⁑. The text delimiter should be set to ⁗.


Make a comment

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s