From d076f0308ab2694b70385189e7d38c24946d5c6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=84riks=20K?= Date: Mon, 29 Jan 2024 16:46:58 +0200 Subject: [PATCH] Issue #1 - change event UUID scheme (#2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes issue #1 Signed-off-by: eriks Reviewed-on: https://git.72.lv/eriks/flask-namedays/pulls/2 Co-authored-by: Ēriks K Co-committed-by: Ēriks K --- .idea/.gitignore | 8 ++++++++ .idea/flask-namedays.iml | 9 +++++++++ .idea/misc.xml | 9 +++++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ assets/index.html | 18 +++++++++--------- requirements.txt | 8 ++++---- service/app.py | 2 +- 8 files changed, 54 insertions(+), 14 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/flask-namedays.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/flask-namedays.iml b/.idea/flask-namedays.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/.idea/flask-namedays.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..45648e4 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..8fb9be1 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/assets/index.html b/assets/index.html index e28572b..1acedb1 100644 --- a/assets/index.html +++ b/assets/index.html @@ -4,8 +4,8 @@ - - + + Namedays! @@ -18,20 +18,20 @@
- +
- - - + + + diff --git a/requirements.txt b/requirements.txt index 01662d4..6787c8a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ -FastAPI==0.105.0 -pydantic==2.5.2 -uvicorn==0.24.0.post1 +FastAPI==0.109.0 +pydantic==2.5.3 +uvicorn==0.27.0.post1 python-multipart==0.0.6 icalendar==5.0.11 -Unidecode==1.3.7 +Unidecode==1.3.8 Gunicorn==21.2.0 diff --git a/service/app.py b/service/app.py index 30bdfb9..3099b1c 100644 --- a/service/app.py +++ b/service/app.py @@ -24,7 +24,7 @@ def generate_ical_for_mapping(cal: dict[datetime.date, list[str]]) -> BytesIO: ev.add("DTSTAMP", datetime.datetime(2000, 1, 1)) ev.add("RRULE", {"FREQ": "YEARLY"}) ev.add("CATEGORY", "Anniversary") - ev.add("UID", uuid.uuid4()) + ev.add("UID", uuid.uuid5(uuid.NAMESPACE_OID, date.strftime("%m-%d"))) alert = Alarm() alert.add("action", "DISPLAY") alert.add("TRIGGER", datetime.timedelta(hours=9))