2022-03-01 01:12:06 +01:00
|
|
|
![Forget](assets/promo.gif)
|
2017-08-07 22:35:57 +02:00
|
|
|
|
2022-09-15 13:55:17 +02:00
|
|
|
![Maintenance status](https://img.shields.io/maintenance/no/2022.svg)
|
2017-09-08 23:38:55 +02:00
|
|
|
|
|
|
|
[![Build status](https://img.shields.io/travis/codl/forget.svg)](https://travis-ci.org/codl/forget/)
|
2017-11-25 00:54:56 +01:00
|
|
|
[![Test coverage](https://img.shields.io/codecov/c/github/codl/forget.svg)](https://codecov.io/gh/codl/forget)
|
2017-08-29 18:46:57 +02:00
|
|
|
|
2022-03-01 00:09:04 +01:00
|
|
|
Forget is a post deleting service for Twitter, Mastodon, and Misskey.
|
2017-08-31 23:51:59 +02:00
|
|
|
|
2022-03-01 00:09:04 +01:00
|
|
|
|
|
|
|
## Features
|
|
|
|
|
|
|
|
* Delete your posts when they cross an age threshold.
|
|
|
|
* Or keep your post count in check, deleting old posts when you go over.
|
|
|
|
* Preserve old posts that matter by giving them a favourite or a reaction.
|
|
|
|
* Set it and <i>forget</i> it. Forget works continuously in the background.
|
|
|
|
|
|
|
|
## Non-features
|
|
|
|
|
|
|
|
Forget is not a one-time purging tool. It is designed to prune your account
|
|
|
|
continuously, not quickly. If you need a lot of posts gone fast, you may want
|
|
|
|
to look for another more-suited tool.
|
2017-08-31 23:51:59 +02:00
|
|
|
|
|
|
|
## Running your own
|
|
|
|
|
|
|
|
### Requirements
|
|
|
|
|
|
|
|
* Postgresql
|
|
|
|
* Redis
|
|
|
|
* Python 3.6+
|
2020-06-01 13:31:42 +02:00
|
|
|
* Node.js 10+
|
2017-08-07 22:35:57 +02:00
|
|
|
|
|
|
|
|
2017-08-31 23:51:59 +02:00
|
|
|
### Set up venv
|
2017-08-07 22:35:57 +02:00
|
|
|
|
2017-08-31 23:51:59 +02:00
|
|
|
Setting up a venv will isolate Forget from your system's libraries and allow you to install
|
|
|
|
dependencies locally as a normal user. It's not necessary but it is recommended!
|
2017-08-10 17:26:36 +02:00
|
|
|
|
2017-08-07 22:35:57 +02:00
|
|
|
```
|
2017-08-31 23:51:59 +02:00
|
|
|
$ python -m venv venv
|
2017-08-07 22:35:57 +02:00
|
|
|
$ source venv/bin/activate
|
2017-08-31 23:51:59 +02:00
|
|
|
```
|
|
|
|
|
2018-04-25 09:12:14 +02:00
|
|
|
If you're using `zsh` or `fish` as a shell, substitute `venv/bin/activate` with
|
|
|
|
`venv/bin/activate.zsh` or `venv/bin/activate.fish`, respectively.
|
2017-08-31 23:51:59 +02:00
|
|
|
|
2018-04-25 09:12:14 +02:00
|
|
|
You will need to "activate" the venv in every new terminal before you can use
|
|
|
|
pip or any python tools included in dependencies (honcho, flask...)
|
2017-08-31 23:51:59 +02:00
|
|
|
|
|
|
|
### Download and install dependencies
|
2017-08-07 22:35:57 +02:00
|
|
|
|
2017-08-31 23:51:59 +02:00
|
|
|
```
|
2017-08-07 22:35:57 +02:00
|
|
|
$ pip install -r requirements.txt
|
2019-03-07 12:05:31 +01:00
|
|
|
$ npm install
|
2017-08-31 23:51:59 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
Wow!! Exciting
|
|
|
|
|
|
|
|
### Create and complete config file
|
|
|
|
|
|
|
|
Gotta set up those, paths, and stuff.
|
|
|
|
|
|
|
|
```
|
2017-08-07 22:35:57 +02:00
|
|
|
$ cp config.example.py config.py
|
|
|
|
$ $EDITOR config.py
|
2017-08-31 23:51:59 +02:00
|
|
|
```
|
2017-08-07 22:35:57 +02:00
|
|
|
|
2017-08-31 23:51:59 +02:00
|
|
|
### Set up database schema
|
|
|
|
|
|
|
|
If you haven't started postgresql yet now would be a great time to do that.
|
|
|
|
|
|
|
|
```
|
|
|
|
$ createdb forget # if you havent created the DB yet
|
2017-08-08 15:40:28 +02:00
|
|
|
$ env FLASK_APP=forget.py flask db upgrade
|
2017-08-31 23:51:59 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
### Build static assets
|
2017-08-08 15:40:28 +02:00
|
|
|
|
2017-08-31 23:51:59 +02:00
|
|
|
Gonna do it...!
|
|
|
|
|
|
|
|
```
|
2017-08-11 15:11:13 +02:00
|
|
|
$ doit
|
2017-08-31 23:51:59 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
Done did it.
|
2017-08-11 15:11:13 +02:00
|
|
|
|
2017-08-31 23:51:59 +02:00
|
|
|
### Running
|
|
|
|
|
|
|
|
The included `Procfile` will run the app server and the background worker.
|
|
|
|
`honcho`, a `Procfile` runner, is included as a dependency:
|
|
|
|
|
|
|
|
```
|
2017-08-07 22:35:57 +02:00
|
|
|
$ honcho start
|
2017-08-31 23:51:59 +02:00
|
|
|
```
|
2017-08-12 01:54:19 +02:00
|
|
|
|
2017-08-31 23:51:59 +02:00
|
|
|
The application server will listen on `http://127.0.0.1:42157`.
|
|
|
|
You'll want to use your favourite web server to proxy traffic to it.
|
|
|
|
|
|
|
|
### Development
|
|
|
|
|
2018-04-25 09:12:14 +02:00
|
|
|
For development, you may want to use `Procfile.dev`, which starts flask in
|
|
|
|
debug mode and rebuilds the static assets automatically when they change
|
2017-08-31 23:51:59 +02:00
|
|
|
|
|
|
|
```
|
2017-08-12 01:54:19 +02:00
|
|
|
$ honcho -f Procfile.dev start
|
2017-08-07 22:35:57 +02:00
|
|
|
```
|
|
|
|
|
2018-04-25 09:12:14 +02:00
|
|
|
Or you could just look at `Procfile.dev` and run those things manually. It's up
|
|
|
|
to you.
|
2017-08-07 22:35:57 +02:00
|
|
|
|
2018-04-25 09:12:14 +02:00
|
|
|
You can run the (currently very incomplete) test suite by running `pytest`.
|
|
|
|
You'll need redis installed on your development machine, a temporary redis
|
|
|
|
server will be started and shut down automatically by the test suite.
|
2017-09-10 15:11:27 +02:00
|
|
|
|
2022-07-30 09:10:43 +02:00
|
|
|
## Docker
|
|
|
|
|
|
|
|
This project is also able to be deployed through Docker.
|
|
|
|
|
2022-08-05 00:21:40 +02:00
|
|
|
1. Copy `config.docker.py` to `config.py` and add additional configurations to
|
2022-07-30 09:10:43 +02:00
|
|
|
your liking.
|
2022-08-05 00:21:40 +02:00
|
|
|
1. By default, the webapp container will be listening on `127.0.0.1:42157`,
|
|
|
|
which you can point a reverse proxy at.
|
|
|
|
* If your reverse proxy is in another docker network then you'll need a
|
|
|
|
`docker-compose.override.yml` file to attach the `www` service to the
|
|
|
|
right network and not publish any ports. An example override file is
|
|
|
|
provided. The web app will be listening on `http://forget-www-1:42157`.
|
2022-07-30 09:10:43 +02:00
|
|
|
1. By default, the `docker-compose.yml` creates relative mounts `./redis`,
|
|
|
|
`./postgres`, and `./celery` relative to the `docker-compose.yml` location.
|
2022-08-05 00:21:40 +02:00
|
|
|
An example `docker-compose.override.yml` file is provided that shows how to
|
|
|
|
change this.
|
|
|
|
1. Run `docker-compose build` to build the image.
|
2022-07-30 09:10:43 +02:00
|
|
|
1. Run `docker-compose up` to start or `docker-compose up -d` to start in the
|
|
|
|
background, and use `docker-compose down` to stop.
|
|
|
|
|
2020-06-01 03:51:55 +02:00
|
|
|
## Contact
|
2017-08-07 22:35:57 +02:00
|
|
|
|
2018-04-25 09:12:14 +02:00
|
|
|
If you're having trouble with Forget, or if you're not having trouble but you
|
|
|
|
just want to tell me you like it, you can drop me a note at
|
|
|
|
[@codl@chitter.xyz](https://chitter.xyz/@codl) or
|
2020-06-01 03:51:55 +02:00
|
|
|
[codl@codl.fr](mailto:codl@codl.fr).
|
|
|
|
|
|
|
|
## Greetz
|
|
|
|
|
|
|
|
Thank you bea, for making ephemeral, inspiring me to make [limiter][], then this,
|
|
|
|
in an attempt to bring ephemeral with me everywhere. ☕
|
|
|
|
|
|
|
|
[limiter]: https://github.com/codl/limiter
|
|
|
|
|
|
|
|
Thank you to the kind folks who have emailed me to tell me Forget has made their
|
|
|
|
time on social media less stressful. 🌻
|