cleanup unused import, revert default config path
This commit is contained in:
parent
624d286d8a
commit
35da34bc8c
3 changed files with 4 additions and 17 deletions
16
README.md
16
README.md
|
@ -2,18 +2,4 @@
|
||||||
|
|
||||||
Use `pgbot.yml` along with `tokens.yml` to set it up. Default directory for configs is `/etc/pgbot`. It needs a list of regex with tokens and a postgresql database to match them. This doc is probably going to be abandoned right away, but at least I have added this line I dunno.
|
Use `pgbot.yml` along with `tokens.yml` to set it up. Default directory for configs is `/etc/pgbot`. It needs a list of regex with tokens and a postgresql database to match them. This doc is probably going to be abandoned right away, but at least I have added this line I dunno.
|
||||||
|
|
||||||
Dependencies:
|
Dependencies: python3 and modules in `requirements.txt`
|
||||||
* aiocron - for the scheduler
|
|
||||||
* bs4 - for parsing html
|
|
||||||
* fake_headers - for tricking search engines
|
|
||||||
* psycopg - for pgsql
|
|
||||||
* pyyaml - for config parsing
|
|
||||||
* requests - for http requests
|
|
||||||
* telethon - for interacting with bot api
|
|
||||||
|
|
||||||
Initial setup:
|
|
||||||
```
|
|
||||||
python -m venv .venv
|
|
||||||
source .venv/bin/activate
|
|
||||||
pip install aiocron bs4 fake_headers psycopg pyyaml requests telethon
|
|
||||||
```
|
|
||||||
|
|
1
pgbot
1
pgbot
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
import sys
|
import sys
|
||||||
import threading
|
|
||||||
|
|
||||||
import telethon
|
import telethon
|
||||||
import yaml
|
import yaml
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
CONFDIR = '/pgbot/conf'
|
''' module defaults '''
|
||||||
|
|
||||||
|
CONFDIR = '/etc/pgbot'
|
||||||
CONFIG = CONFDIR + '/pgbot.yml'
|
CONFIG = CONFDIR + '/pgbot.yml'
|
||||||
TOKENS = CONFDIR + '/tokens.yml'
|
TOKENS = CONFDIR + '/tokens.yml'
|
||||||
SCHEDULE = CONFDIR + '/sched.yml'
|
SCHEDULE = CONFDIR + '/sched.yml'
|
||||||
|
|
Loading…
Reference in a new issue