Alexey Ershov @BadRedSL — Team Leader
Daria Malikova @damalikova — QA
Nikita Chekmarev @IamLimeCake — Code Reviewer
Project is: in progress
- What FoodBot can do?
- How to use FoodBot? Setup
- How to use FoodBot? Supported commands
- Project Structure
- Room for Improvement
- Acknowledgements
- count user's daily amount of nutrients needed based on their physiological characteristics (e.g. age, sex, physical activity level etc.)
- collect data on user's meals, namely portion size, calorific value, proteins/fats/carbs amount
- edit user's personal data and make nutrients recount according to changes
- provide daily, weekly, and monthly statistics of nutrient intake
- send daily info about nutrient intake
Find FoodBot in Telegram and start a conversation with the \start
command:
pic
Requirements:
- Python 3.9+
- PyMySQL
- python-telegram-api
- Clone the
Food_bot_Team_11
repository. - Create Telegram bot following Telegram documentation.
- Save your token into TOKEN variable at
token.json
. Make sure the file is stored one level above your project, so it won't be available on GitHub. - Install
MySQL
and start a connection. - Enjoy!
-
\start
— begins acquaintance with a user, i.e. collects their personal information needed for nutrients count. If the user already exists, the bot deletes their personal information and meal database. -
\go
— provides the main menu:Внести прием пищи
akaAdd meal
Вспомнить свою норму КБЖУ
akaGet nutrients norm
Получить статистику
akaGet statistics
Изменить персональные данные
akaEdit personal data
Удалить запись о последнем приеме пищи
akaDelete the last meal info
-
\help
— provides the list of available commands.
The project contains the following modules:
module | description |
---|---|
foodbot.py |
bot main file |
handlers.py |
bot handlers |
foodbot_filters.py |
custom filter class for user input check. Takes state as an argument for a specific filter activation |
user_class.py |
class for user instance creating, their nutrients count, adding to user_database , and getting statistics |
meal_class.py |
class for meal instance creating, adding to meal_database , and calculating nutrients norm for various time spans |
user_database.py |
database for all bot users |
user_meal_database.py |
database for users' meals (unique for each user) |
learned_dish_database.py |
database containing a list of unique dishes added by users |
- Implement a database with various dishes (like this one), from which nutrient facts will be taken (so that user doesn't need to enter the facts themselves)
- Implement asynchronous database support
- to be defined
- The project was carried out with the support of Intel Programming School. Thank you for the opportunity to grow professionally!
- Many thanks to Malgorzata Rita Ły for
readme.md
template