Skip to main content

Cleanup your toot history.

Project description

Cleantoots

Build Status

Cleantoots helps you delete your old toots. Because not everything we say on social medias should stay there for eternity.

Here's a link to my blog post introducing cleantoots.

The authoritative source for this repo can be found here: https://git.augendre.info/gaugendre/cleantoots

Install

Using pip

python -m pip install cleantoots

ArchLinux package

An ArchLinux package is available, see the AUR.

Config

Initial setup

Only once

cleantoots config setup  # See the following section for config file options
cleantoots config login

View and edit

You can later view the parsed config file with

cleantoots config list

You can edit the config file using

cleantoots config edit

This will open the config file using your preferred editor (EDITOR env variable).

Config options

# Any key in this section will serve as a default for other sections
[DEFAULT]

# Toots that have at least this number of boosts won't be deleted.
boost_limit = 5

# Toots that have at least this number of favorites won't be deleted.
favorite_limit = 5

# Toots that are more recent than this number of days won't be deleted.
days_count = 30

# The timezone to use for dates comparisons.
timezone = Europe/Paris

# Each section represents an account.
[Fosstodon]
# Your Mastodon server URL.
api_base_url = https://fosstodon.org

# These files are used to store app information obtained when running `login`.
# The files must be different between accounts. Two different files are required per account.
app_secret_file = fosstodon_app.secret
user_secret_file = fosstodon_user.secret

# IDs of toots you want to protect (never delete).
# You can find the toot ID in the URL when viewing a toot.
protected_toots = 103362008817616000
    103361883565013391
    103363106195441418

# Tags you want to protect (never delete).
# Tags are matched case insensitively and are only matched for original toots (not for boosts):
# if you boost a toot containing #ScreenshotSunday it won't be protected by this rule.
# You MUST omit the `#` part of the tag.
protected_tags = 100DaysToOffload
    screenshotsunday


# Another account
[Mastodon.social]
api_base_url = https://mastodon.social
app_secret_file = mastodonsocial_app.secret
user_secret_file = mastodonsocial_user.secret

# Overriding some defaults
boost_limit = 10
favorite_limit = 30
days_count = 7

Run

See cleantoots config for the current config.

cleantoots clean  # Defaults to a dry run. Does NOT delete.
cleantoots clean --delete  # Delete without prompt.

Add an account

cleantoots config edit  # Opens editor so you can add your config
cleantoots config list  # Check your newly added account
cleantoots config login --only-missing  # Store credentials for your newly created account
cleantoots clean --delete

Remove an account

# This deletes stored credentials for accounts described in the main config file.
cleantoots config clear-credentials

# You can then edit the config and remove some accounts:
cleantoots config edit

# Then login again for remaining accounts.
cleantoots config login

Tested environments

Cleantoots test suite runs on Python 3.7, 3.8 and 3.9 on latest versions of macOS, Windows and Ubuntu as GitHub Actions understands it.

See the docs for more information on what "latest" means.

Inspiration

The idea behind cleantoots is highly inspired by magnusnissel/cleantweets.

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

cleantoots-0.5.1.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

cleantoots-0.5.1-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

Details for the file cleantoots-0.5.1.tar.gz.

File metadata

  • Download URL: cleantoots-0.5.1.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.4 Darwin/20.6.0

File hashes

Hashes for cleantoots-0.5.1.tar.gz
Algorithm Hash digest
SHA256 1b28090d15c97b6443ddf6ac90887c4ec056565f70450871fd0341fa032419db
MD5 3e95b6868954fd3a94df77ba93f1838b
BLAKE2b-256 4e50b3047ab401f11e92a6405d5681d936b6e7f486a968f5d773262913f6a791

See more details on using hashes here.

File details

Details for the file cleantoots-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: cleantoots-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 21.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.4 Darwin/20.6.0

File hashes

Hashes for cleantoots-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e7e90cd827885d5f49082ea5dbcfef4c25fdcd7a2b2306def94d9d67275aa57d
MD5 dc8c105ffdaf5a0b7859855b42610b34
BLAKE2b-256 a4d25183263134732950df7904b997cfb52e3185aae42cb7ec3a1b9a09bdd30b

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