Ajout road

This commit is contained in:
Ambulance Clerc
2022-06-30 16:22:05 +02:00
parent 55e53afc11
commit 3e6aa6b29a
3 changed files with 10 additions and 2 deletions

View File

@@ -62,6 +62,12 @@ class cls_caldav():
item.desc = event["DESCRIPTION"]
if "#" in item.desc:
item.done = True
if '{href=' in item.desc:
temp_str = item.desc.split('{href=')[1]
temp_str = temp_str.split('}')[0]
item.href = temp_str
item.desc = item.desc.replace("{href=" + item.href + "}","")
item.dtstart = event["DTSTART"].dt.strftime("%d.%m.%Y %H:%M")
item.dtstamp = int(event["DTSTART"].dt.strftime("%Y%m%d%H%M"))
print(item.dtstamp)
@@ -98,6 +104,7 @@ class _caldav_item():
str_end_time = ""
dtstamp = None
done = False
href = ""
def format_str_date(self):
self.str_start_date = datetime.strptime(self.dtstart,"%d.%m.%Y %H:%M").strftime("%d.%m")

View File

@@ -9,7 +9,7 @@
</td>&nbsp;&nbsp;&nbsp;&nbsp;
<td style="{% if task.done %}text-decoration:line-through{% endif %}">
{{ task.name }}<br>
<a href="{{task.href}}" target="_blank" style="text-decoration: none;color: black" >{{ task.name }}<br></a>
{{task.desc}}
</td>
</tr>

View File

@@ -6,10 +6,11 @@
<td style="vertical-align: top;" width="150" >
<span style="font-weight: bold;">{{task.key}}</span><br>
{{task.str_start_date}} - {{task.str_end_date}}<br>
{{task.str_start_time}} - {{task.str_end_time}}<br>
</td>&nbsp;&nbsp;&nbsp;&nbsp;
<td style="{% if task.done %}text-decoration:line-through{% endif %}">
{{ task.name }}<br>
<a href="{{task.href}}" target="_blank" style="text-decoration: none;color: black" >{{ task.name }}<br></a>
{{task.desc}}
</td>
</tr>