From f86d058b0690bf8038ef693b77b3b5ddb2515978 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Thu, 26 Dec 2019 18:41:37 +0100 Subject: [PATCH] Add some doc --- README.md | 20 ++++++++++++++++++++ config.py | 11 ++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..500ec48 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +# Cleantoots + +## Initial config + +Only once + +```bash +pipenv install +pipenv run python main.py create-app +pipenv run python main.py get-credentials +``` + +## Run + +See `config.py` for options. + +```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. +``` diff --git a/config.py b/config.py index cbc44d9..2daf287 100644 --- a/config.py +++ b/config.py @@ -1,12 +1,21 @@ -USER_SECRET_FILE = "cleantootsuser.secret" +# A file to store app information obtained when running `create-app` APP_SECRET_FILE = "cleantootsapp.secret" +# A file to store the user secrets obtained when running `get-credentials` +USER_SECRET_FILE = "cleantootsuser.secret" +# Your Mastodon server URL API_BASE_URL = "https://fosstodon.org" + +# IDs of toots you want to protect (never delete) PROTECTED_TOOTS = [ 103361883565013391, 103362008817616000, 103363106195441418, ] +# 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"