From 34c5be47ca807ef09a42569604341cd97e07d188 Mon Sep 17 00:00:00 2001 From: Loïc Guégan Date: Sun, 27 Jul 2025 14:04:36 +0200 Subject: Add support for output format --- infos.yaml | 1 + main.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/infos.yaml b/infos.yaml index 968aafc..23ef1f1 100644 --- a/infos.yaml +++ b/infos.yaml @@ -126,6 +126,7 @@ events: config: name_wrap: 15 # Line break will follow if names exceed this value + format: "text" # Or html/json/csv/latex/mediawiki calendar: show_room: yes show_time: yes diff --git a/main.py b/main.py index 711ce1e..e089405 100755 --- a/main.py +++ b/main.py @@ -167,7 +167,7 @@ while d<=sem["end"]: formatprojects(getnextdayn(d, 2)), formatprojects(getnextdayn(d, 3)), formatprojects(getnextdayn(d, 4))],False) - print(t) + print(t.get_formatted_string(_c["format"])) d=getnextmonday(d) w+=1 if d 0: @@ -210,4 +210,4 @@ if len(sem["projects"].keys()) > 0: if not _cproj["show_week"]: t.del_column(t.field_names[0]) print("Projects deadlines:") - print(t) + print(t.get_formatted_string(_c["format"])) -- cgit v1.2.3