How yuschkof/izhget_bot works
izhGet_bot is a Telegram bot for looking up Izhevsk tram and trolleybus timetables. Its primary workflow takes a user through a time window, route, origin and destination, then fetches and displays matching timetable results; users can also save, rename and manage favorite routes, use them inline, and schedule daily notifications. Handlers own these actions, with shared callback-keyboard factories, SQLite persistence, and an HTTP/HTML timetable parser beneath them. The README documents these capabilities; links are limited to relationships shown in excerpts, the source index, or the README.
Main entry points: main.py Bot runtime · db.py SQLite data · request.py Timetable parser · new_route.py Route search
Components 14
Bot runtime
- Bot runtime
main.py - User tracking
middlewares.py
User workflows
- Help and support
handlers/common.py - Route search
handlers/new_route.py - Favorite routes
handlers/favorite_route.py - Subscription management
handlers/subscription.py - Inline lookup
handlers/inline.py - Admin tools
handlers/admin.py
Shared services
- Callback keyboards
keyboards/keyboards.py - Timetable parser
request.py
Persistence
- SQLite data
db/db.py
Other components
- Telegram user
- Telegram API
- IzhGET timetable site
Connections 35
- Telegram user → Telegram API: sends updates
README.md - Telegram API → Bot runtime: polls updates
main.py - Bot runtime → User tracking: registers middleware
main.py - User tracking → SQLite data: registers users
middlewares.py - User tracking → SQLite data: tracks activity
middlewares.py - Bot runtime → Help and support: includes router
main.py - Bot runtime → Route search: includes router
main.py - Bot runtime → Favorite routes: includes router
main.py - Bot runtime → Subscription management: includes router
main.py - Bot runtime → Inline lookup: includes router
main.py - Bot runtime → Admin tools: includes router
main.py - Help and support → SQLite data: updates statistics
handlers/common.py - Help and support → Callback keyboards: builds keyboard
handlers/common.py - Help and support → Telegram API: forwards support
handlers/common.py - Route search → Callback keyboards: builds choices
handlers/new_route.py - Route search → Timetable parser: loads stops
handlers/new_route.py - Route search → Timetable parser: fetches timetable
handlers/new_route.py - Route search → SQLite data: saves favorite
handlers/new_route.py - Favorite routes → SQLite data: manages favorites
handlers/favorite_route.py - Favorite routes → Timetable parser: fetches timetable
handlers/favorite_route.py - Favorite routes → Callback keyboards: builds controls
handlers/favorite_route.py - Subscription management → SQLite data: manages subscriptions
handlers/subscription.py - Subscription management → Timetable parser: fetches timetable
handlers/subscription.py - Subscription management → Callback keyboards: builds controls
handlers/subscription.py - Inline lookup → SQLite data: reads favorites
handlers/inline.py - Inline lookup → Timetable parser: fetches timetable
handlers/inline.py - Admin tools → SQLite data: lists users
handlers/admin.py - Admin tools → Telegram API: sends broadcasts
handlers/admin.py - Bot runtime → SQLite data: initializes and queries
main.py - Bot runtime → Timetable parser: closes parser
main.py - Bot runtime → SQLite data: reads due subscriptions
main.py - Bot runtime → Timetable parser: fetches notifications
main.py - Bot runtime → Telegram API: sends notifications
main.py - Timetable parser → IzhGET timetable site: posts requests
request.py - Timetable parser → SQLite data: references data layer
request.py