1
0
Fork 0
parser_from_interneturok/README.md

45 lines
2.0 KiB
Markdown
Executable File

# parser_from_interneturok
Chat-robot Telegram for parsing homeworks by subject name, grade and number of the week
## Dependencies
1. [PHP 8.4](https://www.php.net/releases/8.4/en.php)
2. [Composer](https://getcomposer.org/) (php package manager)
3. [MINIMAL](https://git.svoboda.works/mirzaev/minimal) (PHP framework)
5. [Zanzara](https://github.com/badfarm/zanzara) (Telegram framework + ReactPHP)
6. [Baza](https://git.svoboda.works/mirzaev/baza) (binary database)
7. [NGINX](https://nginx.org/en/) (web server) *(can be replaced)*
8. [SystemD](https://systemd.io/) (service manager) *(can be replaced)*
<small>You can find other dependencies in the file `/composer.json`</small>
## Installation
### SystemD (or any alternative you like)
You can copy an example of systemd file from here: `/examples/systemd/ parser_from_interneturok-telegram.service`<br><br>
**Execute:** `sudo cp parser_from_interneturok-telegram.service /etc/systemd/system/ parser_from_interneturok-telegram.service && sudo chmod +x /etc/systemd/system/ parser_from_interneturok-telegram.service`<br><br>
*before you execute the command think about **what it does** and whether the **paths** are specified correctly*<br>
*the configuration file is very simple and you can remake it for any alternative to SystemD that you like*
### InternetUrok accounts
Fill in the file: `/mirzaev/parser_from_interneturok/system/storage/accounts.csv`<br><br>
**Format:** "mail password" (**separated by 1 space symbol**)
```CSV
mail password
mail password
mail password
```
### Authorized Telegram accounts
Fill in the file: `/mirzaev/parser_from_interneturok/system/settings/accounts.php`
```php
return [
1053489457, // Arsen Mirzaev Tatyano-Muradovich @redloser
]
```
<small>You can get the telegram account identifier by [@RawDataBot](https://t.me/RawDataBot)</small>
### Chat-robot Telegram token
Fill in the file: `/mirzaev/parser_from_interneturok/system/settings/telegram.php`<br>
<small>You can get the chat-robot telegram token by [@BotFather](https://t.me/BotFather)</small>