Updated README.md
This commit is contained in:
pare
688496d857
commit
b23400ecec
S'han modificat 1 arxius amb 26 adicions i 0 eliminacions
26
README.md
26
README.md
|
@ -1 +1,27 @@
|
||||||
# mailing
|
# mailing
|
||||||
|
|
||||||
|
Mail your Mastodon server inactive users and track their feedback, written in Python.
|
||||||
|
|
||||||
|
Any user can ask the bot for the weather of any country like this: @bot weather: New York
|
||||||
|
The bot will reply/toot with all the information given by OpenWeatherMap API.
|
||||||
|
To run this bot you need to get your API key at https://openweathermap.org/api
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
- **Python 3**
|
||||||
|
- Postgresql server
|
||||||
|
- Everything else at the top of `mailing.py`!
|
||||||
|
|
||||||
|
### Usage:
|
||||||
|
|
||||||
|
Within Python Virtual Environment:
|
||||||
|
|
||||||
|
1. Run 'db-setup.py' to create needed database and table and the rest of parameters. All inactive users collected data (see point 3) will be written there.
|
||||||
|
|
||||||
|
2. Run 'setup.py' to set your SMTP parameters and desired email subject. They will be saved to 'secrets/secrets.txt' for further use.
|
||||||
|
|
||||||
|
3. Run 'mailing.py' to start emailing your inactive users (last sign in at older that a year). Their username, account_id, email, delivery status (True if successful) and delivery date will be written to Postgresql database. There is another column, 'deleted', False by default. Will be useful to track deleted/not deleted inactive users if you choose to do so.
|
||||||
|
|
||||||
|
4. Use your favourite scheduling method to set mailing.py to run regularly. Column 'elapsed_days' of mailing's database will be updated so you can decide actions after some time.
|
||||||
|
|
||||||
|
Note: install all needed packages with 'pip install package'
|
||||||
|
|
Loading…
Referencia en una nova incidència