Skip to main content

Simple Twitter CLI for day-to-day social media hygiene

Project description


Logo

plumes

Simple Twitter CLI for day-to-day social media hygiene
· Report Bug · Request Feature

GitHub issues GitHub forks GitHub stars GitHub license

PyPI Version PyPI License PyPI Wheel PyPI Format PyPI Pythons PyPI Implementation

semantic-release Test Release Publish

Twitter

Contents

Overview

Plumes is an open-source Python CLI app for day-to-day social media hygiene. It was designed to provide a simple, clear, and concise interface to quickly explore and clean a personal Twitter account.

Inspiration

Installation

# python >=3.6.1 is required
pip install plumes

Usage

Getting Started And Creating Your Authentication Config

# create your config file
plumes init

Export Your Friends

plumes friends <flags>
  • Optional flags:
    • --screen_name: alternative user (defaults to yourself)
    • --limit: max number of users to export
    • --output: alternative output path

Export Your Followers

plumes followers <flags>
  • Optional flags:
    • --screen_name: alternative user (defaults to yourself)
    • --limit: max number of users to export
    • --output: alternative output path

Export Your Tweets

plumes tweets <flags>
  • Optional flags:
    • --screen_name: alternative user (defaults to yourself)
    • --limit: max number of tweets to export
    • --output: alternative output path

Prune Your Friends

plumes prune_friends PATH <flags>

# e.g.,
plumes friends --output "friends.json"
plumes prune_friends "friends.json" --min_followers 100 --execute
  • PATH: path to JSON file exported from plumes friends
  • Optional flags:
    • --execute: actually perform the pruning process, else a dry-run is performed
    • --days: prune by number of days since last tweeted
    • --min_followers / --max_followers: prune by number of followers
    • --min_friends / --max_friends: prune by number of friends
    • --min_tweets / --max_tweets: prune by number of tweets
    • --min_ratio / --max_ratio: prune by Twitter follower-friend (TFF) ratio

Prune Your Tweets

plumes prune_tweets PATH <flags>

# e.g.,
plumes tweets --output "tweets.json"
plumes prune_tweets "tweets.json" --days 60 --protect_favorited --execute
  • PATH: path to JSON file exported from plumes tweets
  • Optional flags:
    • --execute: actually perform the pruning process, else a dry-run is performed
    • --days: prune age of tweet
    • --protect_favorited: don't prune self-liked tweets
    • --min_likes / --max_likes: prune by number of likes
    • --min_retweets / --max_retweets: prune by number of retweets
    • --min_ratio / --max_ratio: prune by Twitter like-retweet ratio

Setting Up Authentication

Get Your Twitter API Tokens

  • Navigate to the Twitter Dev Portal

  • Click Create an app

  • Fill out the forms

  • Navigate to Keys and tokens

  • Copy the values for API key, API secret key, Access token, and Access token secret

Configuring plumes

The API tokens can either be set as environment variables (using the PLUMES_ prefix; e.g., export PLUMES_CONSUMER_KEY=xxxxx) or configuration variables in ~/.plumes.toml:

  • CONSUMER_KEY = <API key>
  • CONSUMER_SECRET = <API secret key>
  • ACCESS_TOKEN = <Access token>
  • ACCESS_TOKEN_SECRET = <Access token secret>

Contributing

Please see CONTRIBUTING.md and the Code of Conduct for how to contribute to the project

Testing

  • Please review the Makefile for an overview of all available tests
  • The most important tests and make commands are highlighted below:
# auto-format code
make format

# perform all static tests
make check

Icons made by Smashicons from www.flaticon.com

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

plumes-1.1.2.tar.gz (10.9 kB view hashes)

Uploaded Source

Built Distribution

plumes-1.1.2-py3-none-any.whl (9.4 kB view hashes)

Uploaded Python 3

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