Module package
Subpackages
- Commands package
- Data package
- Description
- db_manager
- easter_egg
- exam
- lesson
- professor
- scrapable
- timetable_slot
TimetableSlot
TimetableSlot.ID
TimetableSlot.nome
TimetableSlot.giorno
TimetableSlot.ora_inizio
TimetableSlot.ora_fine
TimetableSlot.aula
TimetableSlot.columns
TimetableSlot.end_hour
TimetableSlot.find()
TimetableSlot.find_all()
TimetableSlot.get_max_giorno()
TimetableSlot.is_still_to_come
TimetableSlot.scrape()
TimetableSlot.table
- Debug package
- Utils package
Description
Modules
callback_handlers
Common query callback families
- module.callback_handlers.exit_handler(update, context)
Called when the user wants to close a sub-menu. Removes the message from the user’s chat
- Parameters:
update (
Update
) – update eventcontext (
CallbackContext
) – context passed by the handler
- Return type:
None
- module.callback_handlers.informative_callback(update, context)
Called by any command that needs to show information to the user
- Parameters:
update (
Update
) – update eventcontext (
CallbackContext
) – context passed by the handler
- Return type:
None
- module.callback_handlers.localization_handler(update, context)
Called by any query that needs to show a localized text to the user
- Parameters:
update (
Update
) – update eventcontext (
CallbackContext
) – context passed by the handler
- Return type:
None
- module.callback_handlers.md_handler(update, context)
Called by any query that needs to show the contents of a markdown file to the user
- Parameters:
update (
Update
) – update eventcontext (
CallbackContext
) – context passed by the handler
- Return type:
None
- module.callback_handlers.none_handler(update, _)
Called when the user clicks an unactive button. Stops the spinning circle
- Parameters:
update (
Update
) – update eventcontext – context passed by the handler
- Return type:
None
Called by sm_.* callbacks. Opens the requested sub-menu, usually by editing the message and adding an InlineKeyboard
- Parameters:
update (
Update
) – update eventcontext (
CallbackContext
) – context passed by the handler
- Return type:
None
easter_egg_func
Nobody knows what those functions do
- module.easter_egg_func.bladrim(update, context)
- module.easter_egg_func.lei_che_ne_pensa_signorina(update, context)
- module.easter_egg_func.prof_sticker(update, context)
- module.easter_egg_func.prof_sticker_id()
- Return type:
str
- module.easter_egg_func.santino(update, context)
- module.easter_egg_func.smonta_portoni(update, context)
- module.easter_egg_func.uni_bandita(update, context)
gitlab
- module.gitlab.download_blob_file_async(update, context, blob=None)
Return the handle to the file if below the maximum size otherwise the download link
- Parameters:
bot – “bot” object of Telegram API
update (
Update
) – “update” object of Telegram APIblob – Object containing ID and name of a blob (default: None)
- module.gitlab.download_blob_file_async_internal(update, context, blob_id, blob_name, db_result)
Download a file asynchronously and send it if the size is less than 50MB, otherwise send the download link
- Parameters:
bot – “bot” object of Telegram API
update (
Update
) – “update” object of Telegram APIblob_id – The id of file to download
blob_name – The name of file to download
db_result – The result of query to achieve web_url, pathname and parent_id
- module.gitlab.explore_repository_tree(origin_id, path='/', db=None)
Explore a repository analyzing for files and directories
- Parameters:
origin_id – Origin repository ID
path – (default: ‘/’)
db – (default: None)
- module.gitlab.format_keyboard_buttons(buttons=[])
Place the buttons on multiple lines if possible
- Parameters:
buttons – Array containing the buttons to display (default: [])
- module.gitlab.get_blob_file(project_id, blob_id)
Return blob object
- Parameters:
project_id – Project ID
blob_id – Blob ID
- module.gitlab.get_chat_id(update)
Return the chat ID from update object
- Parameters:
update (
Update
) – “update” object of Telegram API
- module.gitlab.get_projects(group_id)
Returns an array containing projects of a group
- Paramaters:
group_id: Parent group ID
- module.gitlab.get_repository_tree(project_id, path='/', recursive=False)
Return the repository tree
- Parameters:
project_id – Project ID
path – Folder path of the project (default: ‘/’)
recursive – If True return every file or directory of the repository (default: False)
- module.gitlab.get_subgroups(context, group_id)
Returns an array containing subgroups of a group
- Paramaters:
group_id: Parent group ID
- module.gitlab.git(update, context)
- module.gitlab.gitlab_handler(update, context)
Handle every action of /git and /gitlab command
- Parameters:
bot – “bot” object of Telegram API
update (
Update
) – “update” object of Telegram API
- module.gitlab.init_api()
Initialize the GitLab APIs
- module.gitlab.new_session(token)
Create a new session using the authentication token passed as argument.
- Parameters:
token – Authentication Token for GitLab APIs
- module.gitlab.send_message(update, context, message, buttons=[[]], blob=None)
Send a reply message with text and button or upload a document
- Parameters:
bot – “bot” object of Telegram API
update (
Update
) – “update” object of Telegram APImessage – Message text
buttons – Array of answer buttons (default: [[]])
blob – Object that specifies the blob file to download (default: None)
job_updater
Job updater
- module.job_updater.updater_lep(_)
Called with a set frequence. Updates all the scrapables
- Parameters:
context – context passed by the handler