Skip to main content

Cleantoots

Build Status

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

Useful links:

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.

Similar projects

  • ephemetoot: A similar python-based CLI program to delete your old toots. Has the ability to archive deleted toots.

Inspiration

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

Metadata

Release files for cleantoots 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cleantoots 0.7.0
File Size Uploaded Provenance
cleantoots-0.7.0.tar.gz 10.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cleantoots 0.7.0
File Interpreter ABI Platform
cleantoots-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.4 kB

Release files / cleantoots-0.7.0.tar.gz

Download URL cleantoots-0.7.0.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
24f2f2e5e0c4c4383f8088c84b5de6933110b4a4e31dfea0226bb7ac8ec3ea8e
BLAKE2b-256 checksum
How to use checksums
57b3c26f04b90f17fe2865a74af1a09acd9d0dade7d94bbca2343053af9a05af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.9.4 Darwin/21.2.0

Release files / cleantoots-0.7.0-py3-none-any.whl

Download URL cleantoots-0.7.0-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
14a64e21ab84d46a608f905e4a2917c34a99eb8d658a3f10bf55b4b570f10c96
BLAKE2b-256 checksum
How to use checksums
37e843cb65c7ca2280ac41beb4629c0141bfd8585fb7cf9463e65102da227728
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.9.4 Darwin/21.2.0

Security for cleantoots 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page