commit b36a5d2842cb71ea42e8222480cfc3003b8ea06b
parent 69a80081b6c4007ec1a3a9db4d9f191d3aae8b29
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Tue, 19 May 2020 09:15:09 +0200
Use last timestamp for start/end date parsing of ical files
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.local/bin/plumb b/.local/bin/plumb
@@ -75,9 +75,9 @@ annotate_date_string() {
handle_calendar_invite() {
starttime="$(grep -E "DTSTART.*" "$1" | sed 's/.*://' | \
- annotate_date_string )"
+ tail -1 | annotate_date_string )"
endtime="$(grep -E "DTEND.*" "$1" | sed 's/.*://' | \
- annotate_date_string )"
+ tail -1 | annotate_date_string )"
tzone="$(grep -E "DTEND.*TZID" "$1" | sed 's/.*TZID=\(.*\):.*/\1/' )"
summary="$(grep -E "SUMMARY[;:].*:" "$1" | sed 's/[^:]*: *//' )"
location="$(grep -E "LOCATION[;:].*:" "$1" | sed 's/[^:]*: *//' )"