scheduled tasks
parent
eb31eccdc1
commit
8199fe4432
@ -1,5 +1,6 @@
|
||||
TODO:
|
||||
- check if first run (api call) and show google calendar login button
|
||||
* schedule pypi every().day() or smth like that at (time to print)-5 minutes to update calendar and get ready to print new daily list
|
||||
* parse calendar list to database format and call save_todos() with list of Todos
|
||||
- parse calendar list to database format and call save_todos() with list of Todos
|
||||
- Start uvicorn on device startup (using gunicorn + sysmtectl)
|
||||
* remove from recurring list api call
|
@ -0,0 +1,32 @@
|
||||
from pydantic import BaseModel
|
||||
from datetime import datetime
|
||||
|
||||
class Todo(BaseModel):
|
||||
time: str
|
||||
task: str
|
||||
recurring: bool
|
||||
|
||||
class TodoList(BaseModel):
|
||||
date: str #Always selected date OLD TEXT: #Either current date in %Y-%m-%d format or "recurring" for a recurring task
|
||||
todos: list[Todo]
|
||||
|
||||
|
||||
class TodoDate(BaseModel):
|
||||
date: str
|
||||
# date: str = datetime.today().strftime('%Y-%m-%d')
|
||||
|
||||
|
||||
class PrintAction(BaseModel):
|
||||
date: str = datetime.today().strftime('%Y-%m-%d')
|
||||
action: str #Options:
|
||||
# all (pulls current todos from date, needs date)
|
||||
# sudoku (prints a random sudoku)
|
||||
# todos (prints only dates todos)
|
||||
# wordsearch (prints a random wordsearch)
|
||||
# quote (prints a random quote)
|
||||
# greeting (prints a greeting)
|
||||
# sentence (prints a custom message)
|
||||
sentence: str = ""
|
||||
|
||||
class GoogleUpdate(BaseModel):
|
||||
code: str
|
Loading…
Reference in New Issue