Small script to delete old tweets from your timeline.
- python-twitter 3.1 (
pip install python-twitter
) - API keys from Twitter
Your configuration should be located at ~/.tweetdelete.conf
. At a minimum it
will need to contain the [api]
section.
[api]
consumer_key: ...
consumer_secret: ...
access_token_key: ...
access_token_secret: ...
[general]
max_tweet_age: 180
log_file: ~/.local/var/log/tweetdelete.log
log_format: %(asctime): %(name)s %(levelname)s %(message)s
max_tweet_age
: The maximum age of your tweets in days. Tweets older than this will be deleted.log_file
: Path to file where TweetDelete will log its actions. If the path doesn't already exist, TweetDelete will attempt to create it.log_format
: How the data should be logged. The string should contain valid logging.LogRecord attributes.
You should just be able to execute tweetdelete.py
if you have met the above
requirements and configuration.
If you're running the script from within a VirtualEnv a small shell script is
provided to aid with easily running tweetdelete.py
from your crontab.
- Dry-run mode to display what would have been deleted.