From 99130aa0cab082747f3bebea72c61cb9e10a42fb Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 16 Jun 2022 11:38:44 +0100 Subject: [PATCH 1/3] Parsing OSM links --- maps.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maps.py b/maps.py index 6adf67643..8f0373c89 100644 --- a/maps.py +++ b/maps.py @@ -18,10 +18,10 @@ from utils import save_json def _geocoords_from_osm_link(url: str, osm_domain: str) -> (int, float, float): """Returns geocoordinates from an OSM map link """ - if osm_domain + '/#map=' not in url: + if osm_domain + '#map=' not in url: return None, None, None - coords_str = url.split(osm_domain + '/#map=')[1] + coords_str = url.split(osm_domain + '#map=')[1] if '/' not in coords_str: return None, None, None From ac6d4f4f573e92a57fb7b9d254936fe6b922a0e0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 16 Jun 2022 11:43:03 +0100 Subject: [PATCH 2/3] Change default place color --- epicyon-calendar.css | 2 +- theme/default/theme.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epicyon-calendar.css b/epicyon-calendar.css index 770c41e5b..e61643985 100644 --- a/epicyon-calendar.css +++ b/epicyon-calendar.css @@ -5,7 +5,7 @@ --day-number: #dddddd; --day-number2: #bbbbbb; --time-color: #aaa; - --place-color: black; + --place-color: lightblue; --event-color: grey; --event-public-color: #282c37; --today-foreground: black; diff --git a/theme/default/theme.json b/theme/default/theme.json index 3bd900619..d7ff4ea04 100644 --- a/theme/default/theme.json +++ b/theme/default/theme.json @@ -165,7 +165,7 @@ "vcard-icon-size-mobile": "80px", "vcard-icon-size-tiny": "80px", "lines-color": "grey", - "place-color": "black", + "place-color": "lightblue", "event-color": "grey", "event-public-color": "#282c37", "today-foreground": "black", From 86f0bf388edde4f88f1b7ff97aab6ff57a74524f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 16 Jun 2022 11:54:58 +0100 Subject: [PATCH 3/3] Improve osm map parsing --- maps.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/maps.py b/maps.py index 8f0373c89..b28a842a6 100644 --- a/maps.py +++ b/maps.py @@ -18,10 +18,12 @@ from utils import save_json def _geocoords_from_osm_link(url: str, osm_domain: str) -> (int, float, float): """Returns geocoordinates from an OSM map link """ - if osm_domain + '#map=' not in url: + if osm_domain not in url: + return None, None, None + if '#map=' not in url: return None, None, None - coords_str = url.split(osm_domain + '#map=')[1] + coords_str = url.split('#map=')[1] if '/' not in coords_str: return None, None, None