https://github.com/aorosoeon/concentration_bot
Chatbot for Telegram messenger, which sets a timer for concentration, asks about distractions and success of a task, and uploads this info to a google spreadsheet. Something like the Pomodoro Technique with results recording.
https://github.com/aorosoeon/concentration_bot
bot telegram telegram-bot timer
Last synced: about 1 year ago
JSON representation
Chatbot for Telegram messenger, which sets a timer for concentration, asks about distractions and success of a task, and uploads this info to a google spreadsheet. Something like the Pomodoro Technique with results recording.
- Host: GitHub
- URL: https://github.com/aorosoeon/concentration_bot
- Owner: aorosoeon
- License: mit
- Created: 2022-05-03T15:29:02.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-08-06T01:01:04.000Z (almost 2 years ago)
- Last Synced: 2025-02-12T10:17:25.797Z (over 1 year ago)
- Topics: bot, telegram, telegram-bot, timer
- Language: Python
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# concentration_bot
Chatbot for Telegram messenger, which sets a timer for concentration, asks about distractions and success of a task, and uploads this info to a google spreadsheet. Something like the Pomodoro Technique with results recording.
I used:
1. AsyncTelebot and a couple of other classes from pyTelegramBotAPI package for connecting to Telegram API
2. wraps from functools for creating private access mode (the idea is not mine, I used code from stackoverflow user "S.D." (https://stackoverflow.com/questions/55437732/how-to-restrict-the-acess-to-a-few-users-in-pytelegrambotapi/68229442#68229442)
3. aioschedule for creating a timer
4. asyncio for gathering two tasks - bot.infinity_polling and scheduler
5. google.oauth2 and gspread for connecting to a google spreadsheet
This bot has three commands: set, unset, and stats. When you press "set", you get 3 options of concentration period: 20, 30, and 40 minutes. When the time is up, you get a notification and then could rate your focus and completion of the task. This info uploads to a Google spreadsheet. "unset" - discards a timer. "stats" - shows you info from a spreadsheet in a compact style (for a message).
I run this script from VM in Google Cloud using "nohup" command for continuous work.