diff --git a/.env.example b/.env.example index a6708b3..c00de47 100644 --- a/.env.example +++ b/.env.example @@ -8,7 +8,7 @@ DB_PASSWORD=password # gotgbot BOT_API_URL=https://api.telegram.org BOT_TOKEN=12345678:ABC-DEF1234ghIkl-zyx57W2P0s -CONCURRENT_UPDATES=-1 +CONCURRENT_UPDATES=50 LOG_DISPATCHER_ERRORS=0 # downloads diff --git a/README.md b/README.md index 82c30e9..4312f00 100644 --- a/README.md +++ b/README.md @@ -22,11 +22,6 @@ this project was born after the discontinuation of a highly popular bot known as - pkg-config - mysql db - -## botapi - -to avoid limits on files, you should host your own telegram botapi. public bot instance is currently running under a botapi fork, [tdlight-telegram-bot-api](https://github.com/tdlight-team/tdlight-telegram-bot-api) - ## installation ```bash @@ -36,6 +31,28 @@ cd govd sh build.sh ``` +## env variables + +| variable | description | default | +|-----------------------|--------------------------------------------------|----------------------------------------| +| `DB_HOST` | database host | `localhost` | +| `DB_PORT` | database port | `3306` | +| `DB_NAME` | database name | `govd` | +| `DB_USER` | database user | `govd` | +| `DB_PASSWORD` | database password | `password` | +| `BOT_API_URL`* | telegram bot api url | `https://api.telegram.org` | +| `BOT_TOKEN` | telegram bot token | `12345678:ABC-DEF1234ghIkl-zyx57W2P0s` | +| `CONCURRENT_UPDATES` | max concurrent updates handled by the bot | `50` | +| `LOG_DISPATCHER_ERRORS` | log dispatcher errors | `0` | +| `DOWNLOADS_DIR` | directory for downloaded files | `downloads` | +| `HTTP_PROXY` | http proxy (optional) | | +| `HTTPS_PROXY` | http proxy (optional) | | +| `NO_PROXY` | no proxy domains (optional) | | +| `REPO_URL` | project repository url | `https://github.com/govdbot/govd` | + +**note:** +to avoid limits on files, you should host your own telegram botapi. public bot instance is currently running under a botapi fork, [tdlight-telegram-bot-api](https://github.com/tdlight-team/tdlight-telegram-bot-api), but you can use the official botapi client too. + ## cookies some extractors require cookies for download. to add your cookies, just insert a txt file in cookies folder (netscape format) @@ -50,4 +67,5 @@ some extractors require cookies for download. to add your cookies, just insert a - [ ] improve error handling - [ ] add support for telegram wehbhooks - [ ] switch to pgsql (?) -- [ ] better API (?) \ No newline at end of file +- [ ] better API (?) +- [ ] better docs with multiple README \ No newline at end of file