diff --git a/README.md b/README.md index 53971bd..38f601f 100644 --- a/README.md +++ b/README.md @@ -6,16 +6,62 @@ The idea of cleantoots is highly inspired by [magnusnissel/cleantweets](https:// Only once ```bash -pipenv install -pipenv run python main.py create-app -pipenv run python main.py get-credentials +python -m pip install cleantoots +cleantoots setup-config # See the following section for config options +cleantoots login +``` + +## Config options + +```ini +# 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 `config.py` for options. +See `cleantoots config` for the current config. ```bash -pipenv run python main.py clean-toots # Defaults to a dry run. Does NOT delete. -pipenv run python main.py clean-toots --delete # Delete without prompt. +cleantoots clean # Defaults to a dry run. Does NOT delete. +cleantoots clean --delete # Delete without prompt. ``` diff --git a/pyproject.toml b/pyproject.toml index 4abe6d5..04096fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cleantoots" -version = "0.1.4" +version = "0.1.5" description = "Cleanup your toot history." license = "GPL-3.0-or-later" authors = ["Gabriel Augendre "]