https://github.com/devbis/rzdbot
Telegram bot for searching train tickets
https://github.com/devbis/rzdbot
Last synced: 12 months ago
JSON representation
Telegram bot for searching train tickets
- Host: GitHub
- URL: https://github.com/devbis/rzdbot
- Owner: devbis
- License: mit
- Created: 2017-02-15T07:57:00.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-06-19T05:50:57.000Z (over 1 year ago)
- Last Synced: 2025-01-04T19:11:48.022Z (about 1 year ago)
- Language: Python
- Size: 27.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
README
Telagram bot for searching tickets at rzd.ru
Requirements
============
rzdbot requires python 3.5 or higher due to async/await syntax and aiorzd
library
Installation
============
I asssume you are already register telegram bot. Use the manual for help
https://core.telegram.org/bots
Make sure you have installed aiorzd. Then type ::
sudo python ./setup.py install
Use config.json as a sample to add bot's name and API token for accessing
Telegram. ::
{
"API_TOKEN": "YOUR_TOKEN",
"BOT_NAME": "MyRZDBot"
}
Run bot
-------
::
$ python3 -m rzdbot
or::
$ python3 rzdbot.py
You can pass path to config.json via environment variable::
$ BOT_CONFIG=/etc/rzdbot.json python3 -m rzdbot
Usage
=====
You can search tickets with search command ::
/search Москва, Санкт-Петербург, 20.02 < 2000
will search for trains on february 20 with max price 2000 rubles.
If you need ticket for a group of people, you can set minimal tickets limit ::
/search Москва, Санкт-Петербург, 20.02 < 2000 #3
Also some shortcuts supported: ::
/search мск спб 20 < 2000
will search for tickets on closest 20th day cheaper than 2000 rubles