Configurable cleanup of your toot history on Mastodon. https://pypi.org/project/cleantoots
Find a file
2019-12-28 01:27:51 +01:00
.github/workflows Try to display event name 2019-12-28 01:27:51 +01:00
cleantoots Add params for config folder and file name. Extract config to custom class. 2019-12-28 00:38:18 +01:00
tests Add tests 2019-12-28 00:37:19 +01:00
.gitignore Implement basic cleantoots features 2019-12-26 18:34:37 +01:00
_config.yml Set theme jekyll-theme-slate 2019-12-27 21:55:51 +01:00
LICENSE Create LICENSE 2019-12-26 18:43:55 +01:00
poetry.lock Update poetry.lock 2019-12-27 22:38:02 +01:00
pyproject.toml Bump version 2019-12-28 01:21:00 +01:00
README.md Show color in github action output 2019-12-28 00:47:56 +01:00

Cleantoots

Build Status

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

Initial config

Only once

python -m pip install cleantoots
cleantoots setup-config  # See the following section for config options
cleantoots login

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

# 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.

Tested environments

Cleantoots test suite runs on latest versions of macOS, Windows and Ubuntu as GitHub Actions understands it. See (the docs)[https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idruns-on] for more information on what "latest" means".