update copyright and README

This commit is contained in:
Hugh Rundle 2019-03-08 16:16:00 +11:00
parent eb0d055275
commit 357455126c
2 changed files with 26 additions and 14 deletions

View File

@ -1,16 +1,18 @@
A script for deleting old toots.
Based partially on tweet-deleting script by @flesueur (https://gist.github.com/flesueur/bcb2d9185b64c5191915d860ad19f23f)
Based partially on [tweet-deleting script](https://gist.github.com/flesueur/bcb2d9185b64c5191915d860ad19f23f) by [@flesueur](https://github.com/flesueur)
# Usage
You can use this script to delete toots that are older than a certain number of days. By default it will keep any pinned toots, but you can change that in `config.py` if you want them to be deleted. You can also make a list toots that you want to save, by adding the ID numbers to the `toots_to_save` list in `config.py` (see point 9 below). The ID of a toot is the last part of its individual URL. e.g. for https://ausglam.space/@hugh/101294246770105799 the id is `101294246770105799`
You can use this script to delete [Mastodon](https://github.com/tootsuite/mastodon) toots that are older than a certain number of days. By default it will keep any pinned toots, but you can change that in `config.py` if you want them to be deleted. You can also make a list toots that you want to save, by adding the ID numbers to the `toots_to_save` list in `config.py` (see point 9 below). The ID of a toot is the last part of its individual URL. e.g. for https://ausglam.space/@hugh/101294246770105799 the id is `101294246770105799`
This script requires Python3, the `mastodon.py` package and an API access token.
# Setup
1. Install Python3 if you don't already have it
2. Install the mastodon package: `pip3 install mastodon.py`
3. Copy example.config.py to a new file called config.py (e.g. `cp example.config.py config.py`)
4. Log in to your Mastodon account
3. Copy _example.config.py_ to a new file called _config.py_ (e.g. `cp example.config.py config.py`)
4. Log in to your Mastodon account using a web browser
1. Click the settings cog
2. Click on Development
3. Click 'NEW APPLICATION'
@ -24,17 +26,28 @@ This script requires Python3, the `mastodon.py` package and an API access token.
8. If you do **not** wish to keep all pinned toots regardless of age, change `save_pinned` to `False`
9. If there are any other toots you want to keep, put the ID numbers (without quotes) in the `toots_to_save` list, separated by commas. For example:
`toots_to_save = [100029521330725397, 100013562864734780, 100044187305250752]`
`toots_to_save = [100029521330725397, 100013562864734780, 100044187305250752]`
10. Run the script with `python3 ephemetoot.py`. Depending on how many toots you have and how long you want to keep them, it may take a minute or two before you see any results.
11. To run automatically every day try using crontab:
# Running the script
## Test mode
To do a test-run without actually deleting anything, run the script with the '--test' flag: `python3 ephemetoot.py --test`
## Live mode
Run the script with no flags: `python3 ephemetoot.py`.
Depending on how many toots you have and how long you want to keep them, it may take a minute or two before you see any results.
To run automatically every day you could try using crontab:
1. `crontab -e`
2. `@daily python3 ~/ephemetoot/ephemetoot.py`
# Bugs
# Bugs and suggestions
Please log an issue with as much detail as possible (but don't include your access token!).
Please log an **issue** with as much detail as possible (but don't include your access token!). If you want to suggest any changes or improvements, log an issue or have a chat to me on Mastodon before lodging a pull request.
# License
GPL 3.0+
GPL 3.0+

View File

@ -1,6 +1,6 @@
# #####################################################################
# Ephemetoot - A script to delete your old toots
# Copyright (C) 2018 Hugh Rundle
# Copyright (C) 2018 Hugh Rundle, 2019 Hugh Rundle & Mark Eaton
# Based partially on tweet-deleting script by @flesueur
# (https://gist.github.com/flesueur/bcb2d9185b64c5191915d860ad19f23f)
#
@ -18,7 +18,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# You can contact Hugh on Mastodon @hugh@ausglam.space
# or on Twitter @hughrundle
# or email hugh [at] hughrundle [dot] net
# #####################################################################