Skip to main content

This program cleans up old Twitter tweets.

Project description

Welcome to tidy-twitter

tidy-twitter is a small program that is intended for those who want to clean up their Twitter history. A working Python3 environment and Twitter OAuth keys are required to run this program.

Installation and quickstart

It's recommended to install tidy-twitter with pipx. Install pipx first.

After pipx is installed run:

  pipx install tidy-twitter
  tidy-twitter --help

Twitter OAuth keys

Twitter OAuth keys can be obtained from https://developer.twitter.com/

Export the following keys before running this program:

  • TWITTER_CONSUMER_KEY
  • TWITTER_CONSUMER_SECRET
  • TWITTER_ACCESS_TOKEN
  • TWITTER_ACCESS_TOKEN_SECRET

Developer quick start

This program requires exporting Twitter OAuth keys to environment before use.

Use of virtual env is strongly recommended to not mess up your other / default Python environments.

  1. Clone this repo

  2. Create virtual env (Python 3.9 has been used successfully)

  3. Run the following to install all required dependencies and the program:

      pip install -e .
    
  4. Run:

      tidy-twitter --help
    

Usage

For help run

    $ tidy-twitter --help
    Usage: tidy-twitter [OPTIONS]
    
      This program deletes all tweets for user handle older than given number of
      days.
    
      It requires following Twitter OAuth keys to be exported to the environment
      before use:
    
      TWITTER_CONSUMER_KEY
    
      TWITTER_CONSUMER_SECRET
    
      TWITTER_ACCESS_TOKEN
    
      TWITTER_ACCESS_TOKEN_SECRET
    
    Options:
      -s, --screen_name TEXT  Twitter screen name (@username).  [required]
      -d, --days INTEGER      Number of days, defaults to 30 days.
      --version               Show the version and exit.
      --help                  Show this message and exit.

This program takes a few command line arguments in addition to fore-mentioned Twitter OAuth keys (as environment variables):

  • --screen_name / -s - Twitter user handle (@username) that tweets will be deleted for. Write it here without an @.
  • --days / -d - All tweets older than this number of days will be deleted. Default is 30 (days).
  • --version - displays program version
  • --help - displays help message

License

This software is released under MIT License. See LICENSE.txt for details.

Bugs, issues, feature requests

Feel free to use this repo's Issue Tracker If you have any bugs to report or any requests / issues.

Thanks,

Sven

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tidy-twitter-1.0.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

tidy_twitter-1.0.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file tidy-twitter-1.0.1.tar.gz.

File metadata

  • Download URL: tidy-twitter-1.0.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for tidy-twitter-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f7a09e9ce0cb0e716b09eb89c35e73bd712c30cb5f514e75815bd700ff08551f
MD5 c6ed9bec2884315a39a9b6f891ceb64b
BLAKE2b-256 aee6ccba6bce2c5944563b84691545c4459a5a1f9e5d76dd1ca31fb23efcf521

See more details on using hashes here.

File details

Details for the file tidy_twitter-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: tidy_twitter-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for tidy_twitter-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a8519b445d0b5b31ffa1be6d51a6b12f11a64c65ccd7f3d752471c0fe0772c36
MD5 640f4eb23e2520b5b767c15dd9e1c9e1
BLAKE2b-256 bac59f9e1650ff484563f5d596f8baf615ded09988735ffaa0fa626af1579a23

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page