Add some doc
This commit is contained in:
parent
e04596032e
commit
f86d058b06
2 changed files with 30 additions and 1 deletions
20
README.md
Normal file
20
README.md
Normal file
|
@ -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.
|
||||||
|
```
|
11
config.py
11
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"
|
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"
|
API_BASE_URL = "https://fosstodon.org"
|
||||||
|
|
||||||
|
# IDs of toots you want to protect (never delete)
|
||||||
PROTECTED_TOOTS = [
|
PROTECTED_TOOTS = [
|
||||||
103361883565013391,
|
103361883565013391,
|
||||||
103362008817616000,
|
103362008817616000,
|
||||||
103363106195441418,
|
103363106195441418,
|
||||||
]
|
]
|
||||||
|
# Toots that have at least this number of boosts won't be deleted.
|
||||||
BOOST_LIMIT = 5
|
BOOST_LIMIT = 5
|
||||||
|
# Toots that have at least this number of favorites won't be deleted.
|
||||||
FAVORITE_LIMIT = 5
|
FAVORITE_LIMIT = 5
|
||||||
|
# Toots that are more recent than this number of days won't be deleted.
|
||||||
DAYS_COUNT = 30
|
DAYS_COUNT = 30
|
||||||
|
# The timezone to use for dates comparisons.
|
||||||
TIMEZONE = "Europe/Paris"
|
TIMEZONE = "Europe/Paris"
|
||||||
|
|
Loading…
Reference in a new issue