Telegram bot that use any API for translate messages
You need to download the "src" folder, then create the "interlayer" folder in it and clone the neighboring repository into "interlayer" folder: https://github.com/Allnorm/Polyglot-Interlayer
- Make any folder and place here "src" folder and launcher file (start.bat/start.sh) for your OS. Don't forget the folder "interlayer".
- Launch this file. Bot will install all dependencies and generate a configuration file automatically, taking into account the peculiarities of the functioning of Interlayer.
- To reinstall dependencies, delete the "first_launch" file.
- To change the interlayer, change the contents of the variable in the launcher to match the name of the interlayer file in the folder.
- PyTelegramBotApi https://github.com/eternnoir/pyTelegramBotAPI, GPL-2.0 License
- Pillow https://github.com/python-pillow/Pillow, HPND License
- Pytesseract https://github.com/madmaze/pytesseract, Apache-2.0 License
- Certifi https://github.com/certifi/python-certifi, Mozilla Public License v. 2.0
- token - Telegram bot's token
- max-inits - sets the maximum amount of text distortion allowed. Can be from 0 (function disabled) to 100
- locales-repository - the repository from which the localization file will be loaded. If you run the bot with the -l switch, it will copy its own localization file built into it.
- msg-logging - if true, the bot writes to the log who exactly used his commands. If debug is enabled - adds message content
- enable-auto - enables and disables automatic translations
- pytesseract - path to Tesseract-OCR executable library, usually needed for Windows. Set to "disable" to fully disable this function
- len-limit - limit the length of the input message. 0 - disables the restriction. May be useful for some Interlayers.
- enable-ad - boolean variable, enable or disable the ad engine
- ad-percent - indicates the percentage of the ad display frequency
- distort-output - a boolean variable, indicates whether to show the languages in which the distortion occurred
[Unit]
Description=Polyglot bot
[Service]
WorkingDirectory=/home/allnorm/polyglot
ExecStart=/home/allnorm/polyglot/start.sh
RestartSec=15s
Restart=on-failure
[Install]
WantedBy=default.target