Skip to content

2upo/recipes_scam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

This project is telegram bot for scanning recipes.

TODO:

  • database
  • service
  • tg_client
  • main
  • docker + postgres (data is persisted on volume)
  • migrations
  • refactor and beautify
  • translate
  • categorize
#    USE CASES
# +-------------------------------------------------------------------------------------------------------------------------------+
# |        tg chat id                        data                    start proc                                                   |
# |  User ----------->   1. Send photoes. -----------> Telegram bot ------------>  OCR                                            |
# |    |                                                                           |                                              |
# |    |  <------------------------------------------- Text convertor<-------------+                                              |
# |    |                Send to User                                    rec. text                                                 |
# |    |                                                 |                                                                        |
# |    |                                                 |                                                                        |
# |    |                                                 +----------------- Extract: price & name + Overall amount                |
# |    |                                                                                                                          |
# |    |                                                                                                                          |
# |    |                                                                                                                          |
# |    +--------------->  2. Appove    -----------------------------  Save to db result                                           |
# |    |                                                                                                                          |
# |    |                                                                                                                          |
# |    +--------------->  3. Discard   ------------------------------>  Clear temp record in db                                   |
# |    |                                                                                                                          |
# |    |                                                                                                                          |
# |    |                                                                                                                          |
# |    +---------------------------> register + for security reasons promt user to enter secret number                            |
# |    |                                                                                                                          |
# |    +-------------->  4. Statistics ------------------------  Render statistics png's for certain period with pandas dataframe |
# |                                                                                                                               |
# +-------------------------------------------------------------------------------------------------------------------------------+
#  DATA MODEL
# +-------------------------------------------------------------------------------------------------------------------------------+
# |                                                                                                                               |
# | User                  Purchase               CartItems                                                                        |
# | ---------------       ----------------       ----------------                                                                 |
# | id: int        <-----+id: int          <----+id                                                                               |
# | chat_id: str         |overall: !!! int      |name                                                                             |
# | is_active: bool      |created_at: dt        |name_translated                                                                  |
# |                      |is_commited: bool     |purchase_id                                                                      |
# |                      |user_id: int           price                                                                            |
# |                                                                                                                               |
# | 1. If "Discard" --> ALL Purchases where is_commited = False need to be removed.                                               |
# |                                                                                                                               |
# | 2. Before every action, check if user is_active = True.                                                                       |
# |                                                                                                                               |
# | 3. User receives photo of recognized table + json text of Purchase and related CartItems. User can send                       |
# |    this JSON to edit specific values. Better to use not JSON, but CSV. <-------- !!! Important !!!                            |
# |                                                                                                                               |
# |                                                                                                                               |
# |                                                                                                                               |
# |                                                                                                                               |
# |                                                                                                                               |
# |                                                                                                                               |
# +-------------------------------------------------------------------------------------------------------------------------------+

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages