diff options
| author | marcellus <msimon_fr@hotmail.com> | 2023-06-02 18:39:27 +0200 |
|---|---|---|
| committer | marcellus <msimon_fr@hotmail.com> | 2023-06-02 18:39:27 +0200 |
| commit | e8b1fe3246fda7e132cefb25eb94dc8ca10eb002 (patch) | |
| tree | 56a9d2a09a73f27b7d0d2dd8482dbb6495f6690d /scripts/icstocal | |
| parent | 138edf940d1aa67bcca222ba495b5fcd83b17c69 (diff) | |
feat: added possibility to use more calendars with quand, started patching icstocal
Diffstat (limited to 'scripts/icstocal')
| -rwxr-xr-x | scripts/icstocal | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/icstocal b/scripts/icstocal index 94e8700..3d086ca 100755 --- a/scripts/icstocal +++ b/scripts/icstocal @@ -41,12 +41,15 @@ while line != "END:VCALENDAR\n": summaries.append(line[8:].strip()) elif line.startswith("DTSTART"): start = line.lstrip("DTSTART") + n = 0 + while start[n] != ":": + n+=1 year = "" month = "" day = "" hour = "" min = "" - for i in range(len(start)): + for i in range(n + 1, len(start)): if i >= 1 and i <= 4: year += start[i] elif i == 5 or i == 6: @@ -65,9 +68,11 @@ while line != "END:VCALENDAR\n": starts.append([year, month, day, hour, min]) elif line.startswith("DTEND"): end = line.lstrip("DTEND") + while start[n] != ":": + n+=1 hour = "" min = "" - for i in range(len(end)): + for i in range(n + 1, len(end)): if i == 10: hour += end[i] elif i == 11: |
