Package: plumes
plumesSimple Twitter CLI for day-to-day social media hygiene·Report Bug·Request FeatureContentsContentsOverviewInspirationInstallationUsageGetting Started And Creating Your Authentication ConfigExport FriendsExport FollowersExport TweetsAudit UsersPrune Your TweetsSetting Up AuthenticationGet Your Twitter API TokensConfiguringplumesContributingTestingOverviewPlumesis 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.InspirationInstallation# python >=3.6.1 is requiredpipinstallplumesUsageGetting Started And Creating Your Authentication Config# create your config fileplumesinit# validate your config fileplumescheck_config# print your config file (watch out for sensitive tokens!)plumesview_configExport FriendsExtract friendsordered in which they were added:plumesfriends<flags># e.g., get the friends of Steve Martin (see data in examples dir)plumesfriendsSteveMartinToGo--limit100Arguments:screen_nameOptional[str], optional- Target user's screen name (i.e., Twitter handle). If none is given, authenticated user is used. Defaults to None.limitOptional[int], optional- Max number of users to fetch. Defaults to None.outputOptional[str], optional- Output path for JSON file. Defaults to None.Export FollowersExtract followersordered in which they were added:plumesfollowers<flags># e.g., get the followers of Al Yankovic (see data in examples dir)plumesfollowersalyankovic--limit100Arguments:screen_nameOptional[str], optional- Target user's screen name (i.e., Twitter handle). If none is given, authenticated user is used. Defaults to None.limitOptional[int], optional- Max number of users to fetch. Defaults to None.outputOptional[str], optional- Output path for JSON file. Defaults to None.Export TweetsExtract (and archive) tweetsordered in by most recent:plumestweets<flags># e.g., get the tweets of Conan O'Brien (see data in examples dir)plumestweetsConanOBrien--limit100Arguments:screen_nameOptional[str], optional- Target user's screen name (i.e., Twitter handle). If none is given, authenticated user is used. Defaults to None.limitOptional[int], optional- Max number of users to fetch. Defaults to None.outputOptional[str], optional- Output path for JSON file. Defaults to None.Audit UsersAudit and review users given criteria.
Use this to mass follow/unfollow many users.plumesaudit_usersPATH<flags># e.g., follow 100 of Al Yankovic's followersplumesfollowersalyankovic--limit100plumesaudit_usersalyankovic-followers.json--befriend# e.g., prune (i.e., unfollow) current friends who have less than 100 followers AND haven't tweeted in the last 30 daysplumesfriends--output"friends.json"plumesaudit_users"friends.json"--prune--min_followers100--days30Arguments:pathstr- Path to JSON file of users (e.g., output of friends())min_followersOptional[int], optional- Min number of followers. Defaults to None.max_followersOptional[int], optional- Max number of followers. Defaults to None.min_friendsOptional[int], optional- Min number of friends. Defaults to None.max_friendsOptional[int], optional- Max number of friends. Defaults to None.daysOptional[int], optional- Days since last tweet. Defaults to None.min_tweetsOptional[int], optional- Min number of tweets. Defaults to None.max_tweetsOptional[int], optional- Max number of tweets. Defaults to None.min_favouritesOptional[int], optional- Min number of favourites. Defaults to None.max_favouritesOptional[int], optional- Max number of favourites. Defaults to None.min_ratioOptional[float], optional- Min Twitter follower-friend (TFF) ratio. Defaults to None.max_ratioOptional[float], optional- Max Twitter follower-friend (TFF) ratio. Defaults to None.prunebool, optional- Unfollow identified users. Defaults to False.befriendbool, optional- Follow identified users. Defaults to False.bool_orbool, optional- Switch to boolean OR for conditions. Defaults to False.Prune Your TweetsAudit and review tweets given criteria.
Use this to mass favourite or delete tweets.plumesaudit_tweetsPATH<flags># e.g., delete your tweets that are older than 60 days AND that you didn't self-favouriteplumestweets--output"tweets.json"plumesaudit_tweets"tweets.json"--prune--days60--self_favoritedFalse# e.g., export 100 of Conan O'Brien's tweets and favourite those that have a maximum of 10 likes and a minimum of 50 retweetsplumestweetsConanOBrien--limit100plumesaudit_tweetsConanOBrien-tweets.json--favorite--max_likes10--min_retweets50Arguments:daysOptional[int], optional- Days since tweeted. Defaults to None.min_likesOptional[int], optional- Min number of favourites. Defaults to None.max_likesOptional[int], optional- Max number of favourites. Defaults to None.min_retweetsOptional[int], optional- Min number of retweets. Defaults to None.max_retweetsOptional[int], optional- Max number of retweets. Defaults to None.min_ratioOptional[float], optional- Min Twitter like-retweet ratio. Defaults to None.max_ratioOptional[float], optional- Max Twitter like-retweet ratio. Defaults to None.self_favoritedOptional[bool], optional- Check if tweet is self-liked. Defaults to None.prunebool, optional- Prune and destroy identified tweets. Defaults to False.favoritebool, optional- Like identified tweets. Defaults to False.bool_orbool, optional- Switch to boolean OR for conditions. Defaults to False.Setting Up AuthenticationGet Your Twitter API TokensNavigate to theTwitter Dev PortalClickCreate an appFill out the formsNavigate toKeys and tokensCopy the values forAPI key,API secret key,Access token, andAccess token secretConfiguringplumesThe API tokens can either be set as environment variables (using thePLUMES_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>ContributingPlease seeCONTRIBUTING.mdand theCode of Conductfor how to contribute to the projectTestingPlease review theMakefilefor an overview of all available testsThe most important tests andmakecommands are highlighted below:# auto-format codemakeformat# perform all static testsmakecheckIcons made bySmashiconsfromwww.flaticon.com