Skip to content

Instantly share code, notes, and snippets.

@amac0
amac0 / TwitterBookImages.py
Last active December 1, 2021 03:25
Twitter Book Images for the blog post
#!/usr/bin/python
# Takes a list of files as its arguments. These are the JSON data files
# from a Twitter archive. So, for example:
# python TwitterBookImages.py ~/TwitterArchive/data/js/tweets/*.js
# A very early version of this was based on:
# http://www.leancrew.com/all-this/2013/01/completing-my-twitter-archive/
# but any errors are mine (@amac)
from datetime import datetime, timedelta
/*
* This script goes through your Gmail Inbox and finds recent emails sent
* to you where you are not the last respondent. These may be emails that
* are awaiting your reply. It applies a label to them, so you can search
* for them easily.
*
* To remove and ignore an email thread, just remove the email from inbox
* or remove the unrespondedLabel and apply the ignoreLabel.
*
* This is most effective when paired with a time-based script trigger.