Markownization
This commit is contained in:
parent
074f751844
commit
0fc9def7e4
1 changed files with 12 additions and 9 deletions
|
|
@ -60,11 +60,11 @@ def fill_todo(component, calendar) -> dict[str, str]:
|
|||
|
||||
|
||||
def display_event(event: dict[str, str]):
|
||||
print(event["start"] + " " + event["calendar"] + "/" + event["summary"])
|
||||
print("- " + event["start"] + " " + event["calendar"] + "/" + event["summary"])
|
||||
|
||||
|
||||
def display_todo(todo: dict[str, str]):
|
||||
print("Todo : " + todo["summary"])
|
||||
print("- " + todo["summary"])
|
||||
|
||||
|
||||
def main():
|
||||
|
|
@ -96,14 +96,17 @@ def main():
|
|||
todo_list.append(fill_todo(component, cal))
|
||||
|
||||
event_list = sorted(event_list, key=lambda x: x['dstart'])
|
||||
for event in event_list:
|
||||
display_event(event)
|
||||
if (event_list):
|
||||
print("Evènements")
|
||||
for event in event_list:
|
||||
display_event(event)
|
||||
print("")
|
||||
|
||||
todo_list = sorted(todo_list, key=lambda x: x['dstart'])
|
||||
for todo in todo_list:
|
||||
display_todo(todo)
|
||||
|
||||
print(".")
|
||||
if (todo_list):
|
||||
print("Todo")
|
||||
todo_list = sorted(todo_list, key=lambda x: x['dstart'])
|
||||
for todo in todo_list:
|
||||
display_todo(todo)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue