- Home
- Deutsch
- Skripten / Logik
- Blockly
- Array bzw. JSON Werte splitten
Array bzw. JSON Werte splitten
-
Ich habe mehrere ical Daten als array.
in diesen Array ist ein Attribut "date" enthaltenIch würde dieses per blockly gerne zerlegen in "date1" für das Datum und "time1" für die entsprechende Zeit(spanne).
Um die einzelnen Kalender weiterverarbeiten zu können, habe ich diese per Blockly bereits eingelesen, sortiert und in einen DP als JSON abgespeichert:
Wie kann ich mein Attribut nun zerlegen - und an welcher Stelle?
-
@hausbaer ich würde einfach das ganze Array mit jsonata modifzieren und dabei dann date in 2 einzelne Eigenschaften aufsplitten. um Dir konkret zu helfen, müsstest du aber eine Beispielarray mit Daten hier in Codetags einstellen, damit man es im Jsonata exerciser testen kann.
ist da immer ein Leerzeichen zwischen Datum und Uhrzeit?
Auch wenn das Datum Weiter in der Zukunft liegt?[{"date":"Heute 16:30-17:30","event":"Ereignis 1"},{"date":"Heute 18:30-19:30","event":"Ereignis 2"}]
Dann kann man das ganze einfach so aufteilen:
$.{"date":$substringBefore(date, " "), "time": $substringAfter(date, " "), "event": event}
Dieses sequence: true Objekt - das ist ein Bug in Blockly - das muss man halt wieder wegmachen.
Hie rmal zum Testen:
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="Am`0TfUlDWZxT:k#2^7D">gesamten Kalender sortiert</variable> </variables> <block type="variables_set" id="h+JpCYN#vM^42HMA-ESj" x="38" y="62"> <field name="VAR" id="Am`0TfUlDWZxT:k#2^7D">gesamten Kalender sortiert</field> <value name="VALUE"> <block type="convert_json2object" id="nOG*Fxp5)HEmyz{.p39X"> <value name="VALUE"> <block type="text" id="QP833A~v*I7r%jU/W4=."> <field name="TEXT">[{"date":"Heute 16:30-17:30","event":"Ereignis 1"},{"date":"Heute 18:30-19:30","event":"Ereignis 2"}]</field> </block> </value> </block> </value> <next> <block type="debug" id=",_w49T3iD[Jbx]Bk=W5o"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="3XGbYH#FCc@T`_gZB=K}"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="o[E(WVu8-aEufJn*34n$"> <field name="VAR" id="Am`0TfUlDWZxT:k#2^7D">gesamten Kalender sortiert</field> </block> </value> <next> <block type="variables_set" id="Gij(L;E[vkE_85U=;NI{"> <field name="VAR" id="Am`0TfUlDWZxT:k#2^7D">gesamten Kalender sortiert</field> <value name="VALUE"> <block type="convert_jsonata" id="EY#Y6[)7.VOT~|hnPg]u"> <value name="EXPRESSION"> <shadow type="text" id="Gq|X{HJz/1{;9uxxj{Wf"> <field name="TEXT">$.{"date":$substringBefore(date, " "), "time": $substringAfter(date, " "), "event": event}</field> </shadow> </value> <value name="TARGET"> <block type="variables_get" id="{fT]Nr%$mqvU_MxA`xEO"> <field name="VAR" id="Am`0TfUlDWZxT:k#2^7D">gesamten Kalender sortiert</field> </block> </value> </block> </value> <next> <block type="debug" id="(_|`.+}PcRR;cO..mcpq"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="3XGbYH#FCc@T`_gZB=K}"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="]s?EeED1#(,KV?cAO19I"> <field name="VAR" id="Am`0TfUlDWZxT:k#2^7D">gesamten Kalender sortiert</field> </block> </value> <next> <block type="debug" id="M@Qb}UACw0=K!1|*CUj0"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="/f[SPAB90|OIC8-Oue)p"> <field name="TEXT">test</field> </shadow> <block type="lists_getSublist" id="^B;ehm`Cf^nERo/oaYjx"> <mutation at1="false" at2="false"></mutation> <field name="WHERE1">FIRST</field> <field name="WHERE2">LAST</field> <value name="LIST"> <block type="variables_get" id="72I~A?pm3OkjU7-m{E.P"> <field name="VAR" id="Am`0TfUlDWZxT:k#2^7D">gesamten Kalender sortiert</field> </block> </value> </block> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </xml>
-
@mickym Da ich momentan keinen Zugriff auf den Rechner habe, folgt das Beispiel Array in den nächsten Tagen.
Blockly werde ich mal testen.
-
Guten Morgen,
hier mal ein paar Arrays zu dem Thema.
[{"date":"In 5 Tagen ","event":"Restmüll in ADorf","_class":"ical_Abfall ical_5days","_date":"2024-11-25T23:00:00.000Z","_end":"2024-11-26T23:00:00.000Z","_IDID":"AWIDO-RM-20241126T000000","_allDay":true,"_private":false,"_rule":" ","location":"ADorf; Zuhause (ADorf)","_calName":"Abfall","_calColor":"#919189","_object":{"type":"VEVENT","params":[],"start":"2024-11-25T23:00:00.000Z","datetype":"date","end":"2024-11-26T23:00:00.000Z","dtstamp":"2024-11-20T23:00:09.000Z","uid":"AWIDO-RM-20241126T000000","url":"x.y.de","class":"PUBLIC","created":"2024-01-01T00:00:00.000Z","lastmodified":"2024-01-01T09:43:11.000Z","location":"ADorf; Zuhause (ADorf)","sequence":"0","status":"CONFIRMED","summary":"Restmüll in ADorf","transparency":"TRANSPARENT","method":"PUBLISH"}},
{"date":"05.12.2024 ","event":"Papiertonne in ADorf","_class":"ical_Abfall ","_date":"2024-12-04T23:00:00.000Z","_end":"2024-12-05T23:00:00.000Z","_IDID":"AWIDO-PT-20241205T000000","_allDay":true,"_private":false,"_rule":" ","location":"ADorf; Zuhause (ADorf)","_calName":"Abfall","_calColor":"#919189","_object":{"type":"VEVENT","params":[],"start":"2024-12-04T23:00:00.000Z","datetype":"date","end":"2024-12-05T23:00:00.000Z","dtstamp":"2024-11-20T23:00:09.000Z","uid":"AWIDO-PT-20241205T000000","url":"x.y.de","class":"PUBLIC","created":"2024-01-01T00:00:00.000Z","lastmodified":"2024-01-01T09:43:11.000Z","location":"ADorf; Zuhause (ADorf)","sequence":"0","status":"CONFIRMED","summary":"Papiertonne in ADorf","transparency":"TRANSPARENT","method":"PUBLISH"}},
{"date":"10.12.2024 ","event":"Restmüll in ADorf","_class":"ical_Abfall ","_date":"2024-12-09T23:00:00.000Z","_end":"2024-12-10T23:00:00.000Z","_IDID":"AWIDO-RM-20241210T000000","_allDay":true,"_private":false,"_rule":" ","location":"ADorf; Zuhause (ADorf)","_calName":"Abfall","_calColor":"#919189","_object":{"type":"VEVENT","params":[],"start":"2024-12-09T23:00:00.000Z","datetype":"date","end":"2024-12-10T23:00:00.000Z","dtstamp":"2024-11-20T23:00:09.000Z","uid":"AWIDO-RM-20241210T000000","url":"x.y.de","class":"PUBLIC","created":"2024-01-01T00:00:00.000Z","lastmodified":"2024-01-01T09:43:11.000Z","location":"ADorf; Zuhause (ADorf)","sequence":"0","status":"CONFIRMED","summary":"Restmüll in ADorf","transparency":"TRANSPARENT","method":"PUBLISH"}},
{"date":"13.12.2024 ","event":"Gelber Sack in ADorf","_class":"ical_Abfall ","_date":"2024-12-12T23:00:00.000Z","_end":"2024-12-13T23:00:00.000Z","_IDID":"AWIDO-GS-20241212T000000","_allDay":true,"_private":false,"_rule":" ","location":"ADorf; Zuhause (ADorf)","_calName":"Abfall","_calColor":"#919189","_object":{"type":"VEVENT","params":[],"start":"2024-12-12T23:00:00.000Z","datetype":"date","end":"2024-12-13T23:00:00.000Z","dtstamp":"2024-11-20T23:00:09.000Z","uid":"AWIDO-GS-20241212T000000","class":"PUBLIC","created":"2024-01-01T00:00:00.000Z","lastmodified":"2024-01-18T12:47:52.000Z","location":"ADorf; Zuhause (ADorf)","sequence":"1","status":"CONFIRMED","summary":"Gelber Sack in ADorf","transparency":"TRANSPARENT","method":"PUBLISH"}},
{"date":"23.12.2024 ","event":"Restmüll in ADorf","_class":"ical_Abfall ","_date":"2024-12-22T23:00:00.000Z","_end":"2024-12-23T23:00:00.000Z","_IDID":"AWIDO-RM-20241223T000000","_allDay":true,"_private":false,"_rule":" ","location":"ADorf; Zuhause (ADorf)","_calName":"Abfall","_calColor":"#919189","_object":{"type":"VEVENT","params":[],"start":"2024-12-22T23:00:00.000Z","datetype":"date","end":"2024-12-23T23:00:00.000Z","dtstamp":"2024-11-20T23:00:09.000Z","uid":"AWIDO-RM-20241223T000000","url":"x.y.de","class":"PUBLIC","created":"2024-01-01T00:00:00.000Z","lastmodified":"2024-01-01T09:43:11.000Z","location":"ADorf; Zuhause (ADorf)","sequence":"0","status":"CONFIRMED","summary":"Restmüll in ADorf","transparency":"TRANSPARENT","method":"PUBLISH"}}][{"date":"Heute 14:00-15:00","event":"Auto Werkstatt","_class":"ical_Familie ical_today","_date":"2024-11-21T13:00:00.000Z","_end":"2024-11-21T14:00:00.000Z","_IDID":"kalender1@google.com","_allDay":false,"_private":false,"_rule":" ","location":"","_calName":"Familie","_calColor":"#07fab7","_object":{"type":"VEVENT","params":[],"start":"2024-11-21T13:00:00.000Z","datetype":"date-time","end":"2024-11-21T14:00:00.000Z","dtstamp":"2024-11-20T23:00:17.000Z","uid":"kalender1@google.com","created":"2024-11-14T12:55:27.000Z","lastmodified":"2024-11-14T12:55:27.000Z","sequence":"0","status":"CONFIRMED","summary":"Auto Werkstatt","transparency":"OPAQUE","alarms":[{"type":"VALARM","params":[],"action":"DISPLAY","trigger":"-P0DT0H15M0S","description":"This is an event reminder","end":"2024-11-21T23:00:17.375Z"}],"method":"PUBLISH"}},
{"date":"Heute 15:00-16:00","event":"Zahnarzt","_class":"ical_Familie ical_today","_date":"2024-11-21T14:00:00.000Z","_end":"2024-11-21T15:00:00.000Z","_IDID":"kalender2@google.com","_allDay":false,"_private":false,"_rule":" ","location":"","_calName":"Familie","_calColor":"#07fab7","_object":{"type":"VEVENT","params":[],"start":"2024-11-21T14:00:00.000Z","datetype":"date-time","end":"2024-11-21T15:00:00.000Z","dtstamp":"2024-11-20T23:00:17.000Z","uid":"kalender2@google.com","created":"2024-06-18T14:55:33.000Z","lastmodified":"2024-06-18T14:55:33.000Z","sequence":"0","status":"CONFIRMED","summary":"Zahnarzt","transparency":"OPAQUE","alarms":[{"type":"VALARM","params":[],"action":"DISPLAY","trigger":"-P0DT0H15M0S","description":"This is an event reminder","end":"2024-11-21T23:00:17.373Z"}],"method":"PUBLISH"}},
{"date":"Morgen 20:30-21:30","event":"Besprechung","_class":"ical_GeburtstageFamilie ical_tomorrow","_date":"2024-11-22T19:30:00.000Z","_end":"2024-11-22T20:30:00.000Z","_IDID":"Kalender3@google.com","_allDay":false,"_private":false,"_rule":" ","location":"","_calName":"GeburtstageFamilie","_calColor":"#06aa2c","_object":{"type":"VEVENT","params":[],"start":"2024-11-22T19:30:00.000Z","datetype":"date-time","end":"2024-11-22T20:30:00.000Z","dtstamp":"2024-11-20T23:00:17.000Z","uid":"Kalender3@google.com","created":"2024-11-18T18:59:18.000Z","lastmodified":"2024-11-18T18:59:18.000Z","sequence":"0","status":"CONFIRMED","summary":"Besprechung","transparency":"OPAQUE","method":"PUBLISH"}},
{"date":"Übermorgen 09:00-10:00","event":"Frühstücken","_class":"ical_Familie ical_dayafter","_date":"2024-11-23T08:00:00.000Z","_end":"2024-11-23T09:00:00.000Z","_IDID":"Kalender4l@google.com","_allDay":false,"_private":false,"_rule":" ","location":"","_calName":"Familie","_calColor":"#07fab7","_object":{"type":"VEVENT","params":[],"start":"2024-11-23T08:00:00.000Z","datetype":"date-time","end":"2024-11-23T09:00:00.000Z","dtstamp":"2024-11-20T23:00:17.000Z","uid":"Kalender4l@google.com","created":"2024-10-29T07:11:21.000Z","lastmodified":"2024-10-29T07:11:21.000Z","sequence":"0","status":"CONFIRMED","summary":"Frühstücken","transparency":"OPAQUE","alarms":[{"type":"VALARM","params":[],"action":"DISPLAY","trigger":"-P0DT0H15M0S","description":"This is an event reminder","end":"2024-11-21T23:00:17.375Z"}],"method":"PUBLISH"}},
{"date":"In 6 Tagen 07:00-07:30","event":"Geburtstag1","_class":"ical_GeburtstageFamilie ical_6days","_date":"2024-11-27T06:00:00.000Z","_end":"2024-11-27T06:30:00.000Z","_section":"<span><span>1967</span> <br></span>","_IDID":"kalender5@google.com","_allDay":false,"_private":false,"_rule":" rrule ","location":"Zuhause","_calName":"GeburtstageFamilie","_calColor":"#06aa2c","_object":{"type":"VEVENT","params":[],"start":"2024-11-27T06:00:00.000Z","datetype":"date-time","end":"2024-11-27T06:30:00.000Z","rrule":{"_cache":{"all":false,"before":[],"after":[],"between":[]},"origOptions":{"tzid":"Europe/Berlin","dtstart":"1967-11-27T06:00:00.000Z","freq":0},"options":{"freq":0,"dtstart":"1967-11-27T06:00:00.000Z","interval":1,"wkst":0,"count":null,"until":null,"tzid":"Europe/Berlin","bysetpos":null,"bymonth":[11],"bymonthday":[27],"bynmonthday":[],"byyearday":null,"byweekno":null,"byweekday":null,"bynweekday":null,"byhour":[6],"byminute":[0],"bysecond":[0],"byeaster":null}},"dtstamp":"2024-11-20T23:00:17.000Z","uid":"Kalender5@google.com","created":"2021-01-31T19:24:01.000Z","description":"<span><span>1967</span> <br></span>","lastmodified":"2021-01-31T19:24:01.000Z","location":"Zuhause","sequence":"0","status":"CONFIRMED","summary":"Geburtstag1","transparency":"OPAQUE","method":"PUBLISH"}},
{"date":"14.12.2024 07:00-07:30","event":"Geburtstag2","_class":"ical_GeburtstageFamilie ","_date":"2024-12-14T06:00:00.000Z","_end":"2024-12-14T06:30:00.000Z","_section":"2019","_IDID":"Kalender6@google.com","_allDay":false,"_private":false,"_rule":" rrule ","location":"Los Angeles","_calName":"GeburtstageFamilie","_calColor":"#06aa2c","_object":{"type":"VEVENT","params":[],"start":"2024-12-14T06:00:00.000Z","datetype":"date-time","end":"2024-12-14T06:30:00.000Z","rrule":{"_cache":{"all":false,"before":[],"after":[],"between":[]},"origOptions":{"tzid":"Europe/Berlin","dtstart":"2019-12-14T06:00:00.000Z","freq":0,"bymonthday":14,"bymonth":12},"options":{"freq":0,"dtstart":"2019-12-14T06:00:00.000Z","interval":1,"wkst":0,"count":null,"until":null,"tzid":"Europe/Berlin","bysetpos":null,"bymonth":[12],"bymonthday":[14],"bynmonthday":[],"byyearday":null,"byweekno":null,"byweekday":null,"bynweekday":null,"byhour":[6],"byminute":[0],"bysecond":[0],"byeaster":null}},"dtstamp":"2024-11-20T23:00:17.000Z","uid":"Kalender6@google.com","created":"2021-01-30T16:15:33.000Z","description":"2019","lastmodified":"2021-01-30T16:15:33.000Z","location":"Los Angeles","sequence":"0","status":"CONFIRMED","summary":"Geburtstag2","transparency":"OPAQUE","method":"PUBLISH"}}][{"date":"In 4 Tagen 16:00-17:00","event":"Zahnarzt","_class":"ical_ich ical_4days","_date":"2024-11-25T15:00:00.000Z","_end":"2024-11-25T16:00:00.000Z","_IDID":"Kalender7@google.com","_allDay":false,"_private":false,"_rule":" ","location":"","_calName":"ich","_calColor":"#1557f0","_object":{"type":"VEVENT","params":[],"start":"2024-11-25T15:00:00.000Z","datetype":"date-time","end":"2024-11-25T16:00:00.000Z","dtstamp":"2024-11-21T18:30:01.000Z","uid":"Kalender7@google.com","created":"2024-10-31T05:31:42.000Z","lastmodified":"2024-10-31T05:31:42.000Z","sequence":"0","status":"CONFIRMED","summary":"Zahnarzt","transparency":"OPAQUE","alarms":[{"type":"VALARM","params":[],"action":"DISPLAY","trigger":"-P0DT1H0M0S","description":"This is an event reminder","end":"2024-11-22T18:30:01.360Z"}],"method":"PUBLISH"}},
{"date":"In 5 Tagen 19:00-22:00","event":"Ausschusssitzung","_class":"ical_Feuerwehr ical_5days","_date":"2024-11-26T18:00:00.000Z","_end":"2024-11-26T21:00:00.000Z","_IDID":"Kalender8@google.com","_allDay":false,"_private":false,"_rule":" ","location":"FGH BDorf","_calName":"Feuerwehr","_calColor":"#FF0F02","_object":{"type":"VEVENT","params":[],"start":"2024-11-26T18:00:00.000Z","datetype":"date-time","end":"2024-11-26T21:00:00.000Z","dtstamp":"2024-11-21T18:30:01.000Z","uid":"Kalender8@google.com","created":"2024-10-01T19:49:42.000Z","lastmodified":"2024-10-01T19:49:42.000Z","location":"FGH BDorf","sequence":"0","status":"CONFIRMED","summary":"Ausschusssitzung","transparency":"OPAQUE","method":"PUBLISH"}},
{"date":"29.11.2024 20:00-23:00","event":"Herbstdienstversammlung","_class":"ical_Feuerwehr ","_date":"2024-11-29T19:00:00.000Z","_end":"2024-11-29T22:00:00.000Z","_IDID":"Kalender8@google.com","_allDay":false,"_private":false,"_rule":" ","location":"CStadt","_calName":"Feuerwehr","_calColor":"#FF0F02","_object":{"type":"VEVENT","params":[],"start":"2024-11-29T19:00:00.000Z","datetype":"date-time","end":"2024-11-29T22:00:00.000Z","dtstamp":"2024-11-21T18:30:01.000Z","uid":"Kalender8@google.com","created":"2024-10-17T12:57:23.000Z","lastmodified":"2024-11-21T17:41:05.000Z","location":"CStadt","sequence":"1","status":"CONFIRMED","summary":"Herbstdienstversammlung","transparency":"OPAQUE","method":"PUBLISH"}}]
Wirklich wichtig wären eigentlich nur
- "date" (das soll ja gesplittet werden)
- "event"
Der Rest ist für meinen Zweck eigentlich uninteressant.
Verstanden habe ich das Blockly noch nicht.
-
Du musst die Arrays noch in CodeTags packen sonst kann man die nicht korrekt kopieren - da Zeichen interpretiert werden.
Ich sehe nur nicht, dass Dein date da einheitlich aufgebaut ist, vielleicht solltest Du Dir lieber andere Eigenschaften (Felder) nutze als date.
Nun zu Deinen beiden Fragen:
- Das erste ist nur deshalb so weil ich kein ical Adapter nutze. Du erzeugst die Liste natürlich über einen Datenpunkt das Array mit den Objekten. Ich muss aber Deine Daten ja irgendwie nachbauen.
- Ja so kannst Du das Objekt neu aufbauen. Am Besten schaust Du Dir das mit dem JSONATA Exerciser an.
Wie gesagt, pack bitte Deine Beispielarrays noch in CodeTags.
Und wie gesagt, beim ersten Array - wie willst Du da in date was aufteilen? Da kommen folgende Infos:
[ "In 5 Tagen ", "05.12.2024 ", "10.12.2024 ", "13.12.2024 ", "23.12.2024 " ]
Beim 3. Array
[ "In 4 Tagen 16:00-17:00", "In 5 Tagen 19:00-22:00", "29.11.2024 20:00-23:00" ]
OK jetzt geht das 2. Array auch.
[ "Heute 14:00-15:00", "Heute 15:00-16:00", "Morgen 20:30-21:30", "Übermorgen 09:00-10:00", "In 6 Tagen 07:00-07:30", "14.12.2024 07:00-07:30" ]
könte man ggf. mit RegEx arbeiten und die Uhrzeiten als Konstante nehmen.
Beim 1. Array fehlen aber die Uhrzeiten komplett.
Ich werde mal was mit regulären Ausdrücken basteln.
-
OK - Array 1 unterscheidet sich von Array 2 und 3 - und man kann das über den Objekttyp unterscheiden.
Array 2 und 3 haben den Datentyp: date - time
Array 1 hingegen nur date:
wahrscheinlich kann man das auch mischen und man kann das natürlich auch abfragen. Die Frage ist nur, ob Du es Dir nicht einfacher machst, in dem Du das Startdatum nimmst und selbst ein normales Datum und Uhrzeit nimmst, anstelle dieses in 5 Tagen, heute etc.
-
So ich habe Dir nun eine Lösung gebastelt, damit sollten alle 3 Arrays funktionieren:
https://try.jsonata.org/nTWvVsHVS$.{"date": _allDay ? $trim(date) : $match(date,/(.*?)\s(\d+:\d+-\d+:\d+)/).groups[0], "time": _allDay ? "Ganztägig" : $match(date,/(.*?)\s(\d+:\d+-\d+:\d+)/).groups[1], "event":event}
Ich hab mal Deine Arrays in ein verschachteltest Array gepackt:
[ [ { "date": "In 5 Tagen ", "event": "Restmüll in ADorf", "_class": "ical_Abfall ical_5days", "_date": "2024-11-25T23:00:00.000Z", "_end": "2024-11-26T23:00:00.000Z", "_IDID": "AWIDO-RM-20241126T000000", "_allDay": true, "_private": false, "_rule": " ", "location": "ADorf; Zuhause (ADorf)", "_calName": "Abfall", "_calColor": "#919189", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-25T23:00:00.000Z", "datetype": "date", "end": "2024-11-26T23:00:00.000Z", "dtstamp": "2024-11-20T23:00:09.000Z", "uid": "AWIDO-RM-20241126T000000", "url": "x.y.de", "class": "PUBLIC", "created": "2024-01-01T00:00:00.000Z", "lastmodified": "2024-01-01T09:43:11.000Z", "location": "ADorf; Zuhause (ADorf)", "sequence": "0", "status": "CONFIRMED", "summary": "Restmüll in ADorf", "transparency": "TRANSPARENT", "method": "PUBLISH" } }, { "date": "05.12.2024 ", "event": "Papiertonne in ADorf", "_class": "ical_Abfall ", "_date": "2024-12-04T23:00:00.000Z", "_end": "2024-12-05T23:00:00.000Z", "_IDID": "AWIDO-PT-20241205T000000", "_allDay": true, "_private": false, "_rule": " ", "location": "ADorf; Zuhause (ADorf)", "_calName": "Abfall", "_calColor": "#919189", "_object": { "type": "VEVENT", "params": [], "start": "2024-12-04T23:00:00.000Z", "datetype": "date", "end": "2024-12-05T23:00:00.000Z", "dtstamp": "2024-11-20T23:00:09.000Z", "uid": "AWIDO-PT-20241205T000000", "url": "x.y.de", "class": "PUBLIC", "created": "2024-01-01T00:00:00.000Z", "lastmodified": "2024-01-01T09:43:11.000Z", "location": "ADorf; Zuhause (ADorf)", "sequence": "0", "status": "CONFIRMED", "summary": "Papiertonne in ADorf", "transparency": "TRANSPARENT", "method": "PUBLISH" } }, { "date": "10.12.2024 ", "event": "Restmüll in ADorf", "_class": "ical_Abfall ", "_date": "2024-12-09T23:00:00.000Z", "_end": "2024-12-10T23:00:00.000Z", "_IDID": "AWIDO-RM-20241210T000000", "_allDay": true, "_private": false, "_rule": " ", "location": "ADorf; Zuhause (ADorf)", "_calName": "Abfall", "_calColor": "#919189", "_object": { "type": "VEVENT", "params": [], "start": "2024-12-09T23:00:00.000Z", "datetype": "date", "end": "2024-12-10T23:00:00.000Z", "dtstamp": "2024-11-20T23:00:09.000Z", "uid": "AWIDO-RM-20241210T000000", "url": "x.y.de", "class": "PUBLIC", "created": "2024-01-01T00:00:00.000Z", "lastmodified": "2024-01-01T09:43:11.000Z", "location": "ADorf; Zuhause (ADorf)", "sequence": "0", "status": "CONFIRMED", "summary": "Restmüll in ADorf", "transparency": "TRANSPARENT", "method": "PUBLISH" } }, { "date": "13.12.2024 ", "event": "Gelber Sack in ADorf", "_class": "ical_Abfall ", "_date": "2024-12-12T23:00:00.000Z", "_end": "2024-12-13T23:00:00.000Z", "_IDID": "AWIDO-GS-20241212T000000", "_allDay": true, "_private": false, "_rule": " ", "location": "ADorf; Zuhause (ADorf)", "_calName": "Abfall", "_calColor": "#919189", "_object": { "type": "VEVENT", "params": [], "start": "2024-12-12T23:00:00.000Z", "datetype": "date", "end": "2024-12-13T23:00:00.000Z", "dtstamp": "2024-11-20T23:00:09.000Z", "uid": "AWIDO-GS-20241212T000000", "class": "PUBLIC", "created": "2024-01-01T00:00:00.000Z", "lastmodified": "2024-01-18T12:47:52.000Z", "location": "ADorf; Zuhause (ADorf)", "sequence": "1", "status": "CONFIRMED", "summary": "Gelber Sack in ADorf", "transparency": "TRANSPARENT", "method": "PUBLISH" } }, { "date": "23.12.2024 ", "event": "Restmüll in ADorf", "_class": "ical_Abfall ", "_date": "2024-12-22T23:00:00.000Z", "_end": "2024-12-23T23:00:00.000Z", "_IDID": "AWIDO-RM-20241223T000000", "_allDay": true, "_private": false, "_rule": " ", "location": "ADorf; Zuhause (ADorf)", "_calName": "Abfall", "_calColor": "#919189", "_object": { "type": "VEVENT", "params": [], "start": "2024-12-22T23:00:00.000Z", "datetype": "date", "end": "2024-12-23T23:00:00.000Z", "dtstamp": "2024-11-20T23:00:09.000Z", "uid": "AWIDO-RM-20241223T000000", "url": "x.y.de", "class": "PUBLIC", "created": "2024-01-01T00:00:00.000Z", "lastmodified": "2024-01-01T09:43:11.000Z", "location": "ADorf; Zuhause (ADorf)", "sequence": "0", "status": "CONFIRMED", "summary": "Restmüll in ADorf", "transparency": "TRANSPARENT", "method": "PUBLISH" } } ], [ { "date": "Heute 14:00-15:00", "event": "Auto Werkstatt", "_class": "ical_Familie ical_today", "_date": "2024-11-21T13:00:00.000Z", "_end": "2024-11-21T14:00:00.000Z", "_IDID": "kalender1@google.com", "_allDay": false, "_private": false, "_rule": " ", "location": "", "_calName": "Familie", "_calColor": "#07fab7", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-21T13:00:00.000Z", "datetype": "date-time", "end": "2024-11-21T14:00:00.000Z", "dtstamp": "2024-11-20T23:00:17.000Z", "uid": "kalender1@google.com", "created": "2024-11-14T12:55:27.000Z", "lastmodified": "2024-11-14T12:55:27.000Z", "sequence": "0", "status": "CONFIRMED", "summary": "Auto Werkstatt", "transparency": "OPAQUE", "alarms": [ { "type": "VALARM", "params": [], "action": "DISPLAY", "trigger": "-P0DT0H15M0S", "description": "This is an event reminder", "end": "2024-11-21T23:00:17.375Z" } ], "method": "PUBLISH" } }, { "date": "Heute 15:00-16:00", "event": "Zahnarzt", "_class": "ical_Familie ical_today", "_date": "2024-11-21T14:00:00.000Z", "_end": "2024-11-21T15:00:00.000Z", "_IDID": "kalender2@google.com", "_allDay": false, "_private": false, "_rule": " ", "location": "", "_calName": "Familie", "_calColor": "#07fab7", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-21T14:00:00.000Z", "datetype": "date-time", "end": "2024-11-21T15:00:00.000Z", "dtstamp": "2024-11-20T23:00:17.000Z", "uid": "kalender2@google.com", "created": "2024-06-18T14:55:33.000Z", "lastmodified": "2024-06-18T14:55:33.000Z", "sequence": "0", "status": "CONFIRMED", "summary": "Zahnarzt", "transparency": "OPAQUE", "alarms": [ { "type": "VALARM", "params": [], "action": "DISPLAY", "trigger": "-P0DT0H15M0S", "description": "This is an event reminder", "end": "2024-11-21T23:00:17.373Z" } ], "method": "PUBLISH" } }, { "date": "Morgen 20:30-21:30", "event": "Besprechung", "_class": "ical_GeburtstageFamilie ical_tomorrow", "_date": "2024-11-22T19:30:00.000Z", "_end": "2024-11-22T20:30:00.000Z", "_IDID": "Kalender3@google.com", "_allDay": false, "_private": false, "_rule": " ", "location": "", "_calName": "GeburtstageFamilie", "_calColor": "#06aa2c", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-22T19:30:00.000Z", "datetype": "date-time", "end": "2024-11-22T20:30:00.000Z", "dtstamp": "2024-11-20T23:00:17.000Z", "uid": "Kalender3@google.com", "created": "2024-11-18T18:59:18.000Z", "lastmodified": "2024-11-18T18:59:18.000Z", "sequence": "0", "status": "CONFIRMED", "summary": "Besprechung", "transparency": "OPAQUE", "method": "PUBLISH" } }, { "date": "Übermorgen 09:00-10:00", "event": "Frühstücken", "_class": "ical_Familie ical_dayafter", "_date": "2024-11-23T08:00:00.000Z", "_end": "2024-11-23T09:00:00.000Z", "_IDID": "Kalender4l@google.com", "_allDay": false, "_private": false, "_rule": " ", "location": "", "_calName": "Familie", "_calColor": "#07fab7", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-23T08:00:00.000Z", "datetype": "date-time", "end": "2024-11-23T09:00:00.000Z", "dtstamp": "2024-11-20T23:00:17.000Z", "uid": "Kalender4l@google.com", "created": "2024-10-29T07:11:21.000Z", "lastmodified": "2024-10-29T07:11:21.000Z", "sequence": "0", "status": "CONFIRMED", "summary": "Frühstücken", "transparency": "OPAQUE", "alarms": [ { "type": "VALARM", "params": [], "action": "DISPLAY", "trigger": "-P0DT0H15M0S", "description": "This is an event reminder", "end": "2024-11-21T23:00:17.375Z" } ], "method": "PUBLISH" } }, { "date": "In 6 Tagen 07:00-07:30", "event": "Geburtstag1", "_class": "ical_GeburtstageFamilie ical_6days", "_date": "2024-11-27T06:00:00.000Z", "_end": "2024-11-27T06:30:00.000Z", "_section": "<span><span>1967</span> <br></span>", "_IDID": "kalender5@google.com", "_allDay": false, "_private": false, "_rule": " rrule ", "location": "Zuhause", "_calName": "GeburtstageFamilie", "_calColor": "#06aa2c", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-27T06:00:00.000Z", "datetype": "date-time", "end": "2024-11-27T06:30:00.000Z", "rrule": { "_cache": { "all": false, "before": [], "after": [], "between": [] }, "origOptions": { "tzid": "Europe/Berlin", "dtstart": "1967-11-27T06:00:00.000Z", "freq": 0 }, "options": { "freq": 0, "dtstart": "1967-11-27T06:00:00.000Z", "interval": 1, "wkst": 0, "count": null, "until": null, "tzid": "Europe/Berlin", "bysetpos": null, "bymonth": [ 11 ], "bymonthday": [ 27 ], "bynmonthday": [], "byyearday": null, "byweekno": null, "byweekday": null, "bynweekday": null, "byhour": [ 6 ], "byminute": [ 0 ], "bysecond": [ 0 ], "byeaster": null } }, "dtstamp": "2024-11-20T23:00:17.000Z", "uid": "Kalender5@google.com", "created": "2021-01-31T19:24:01.000Z", "description": "<span><span>1967</span> <br></span>", "lastmodified": "2021-01-31T19:24:01.000Z", "location": "Zuhause", "sequence": "0", "status": "CONFIRMED", "summary": "Geburtstag1", "transparency": "OPAQUE", "method": "PUBLISH" } }, { "date": "14.12.2024 07:00-07:30", "event": "Geburtstag2", "_class": "ical_GeburtstageFamilie ", "_date": "2024-12-14T06:00:00.000Z", "_end": "2024-12-14T06:30:00.000Z", "_section": "2019", "_IDID": "Kalender6@google.com", "_allDay": false, "_private": false, "_rule": " rrule ", "location": "Los Angeles", "_calName": "GeburtstageFamilie", "_calColor": "#06aa2c", "_object": { "type": "VEVENT", "params": [], "start": "2024-12-14T06:00:00.000Z", "datetype": "date-time", "end": "2024-12-14T06:30:00.000Z", "rrule": { "_cache": { "all": false, "before": [], "after": [], "between": [] }, "origOptions": { "tzid": "Europe/Berlin", "dtstart": "2019-12-14T06:00:00.000Z", "freq": 0, "bymonthday": 14, "bymonth": 12 }, "options": { "freq": 0, "dtstart": "2019-12-14T06:00:00.000Z", "interval": 1, "wkst": 0, "count": null, "until": null, "tzid": "Europe/Berlin", "bysetpos": null, "bymonth": [ 12 ], "bymonthday": [ 14 ], "bynmonthday": [], "byyearday": null, "byweekno": null, "byweekday": null, "bynweekday": null, "byhour": [ 6 ], "byminute": [ 0 ], "bysecond": [ 0 ], "byeaster": null } }, "dtstamp": "2024-11-20T23:00:17.000Z", "uid": "Kalender6@google.com", "created": "2021-01-30T16:15:33.000Z", "description": "2019", "lastmodified": "2021-01-30T16:15:33.000Z", "location": "Los Angeles", "sequence": "0", "status": "CONFIRMED", "summary": "Geburtstag2", "transparency": "OPAQUE", "method": "PUBLISH" } } ], [ { "date": "In 4 Tagen 16:00-17:00", "event": "Zahnarzt", "_class": "ical_ich ical_4days", "_date": "2024-11-25T15:00:00.000Z", "_end": "2024-11-25T16:00:00.000Z", "_IDID": "Kalender7@google.com", "_allDay": false, "_private": false, "_rule": " ", "location": "", "_calName": "ich", "_calColor": "#1557f0", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-25T15:00:00.000Z", "datetype": "date-time", "end": "2024-11-25T16:00:00.000Z", "dtstamp": "2024-11-21T18:30:01.000Z", "uid": "Kalender7@google.com", "created": "2024-10-31T05:31:42.000Z", "lastmodified": "2024-10-31T05:31:42.000Z", "sequence": "0", "status": "CONFIRMED", "summary": "Zahnarzt", "transparency": "OPAQUE", "alarms": [ { "type": "VALARM", "params": [], "action": "DISPLAY", "trigger": "-P0DT1H0M0S", "description": "This is an event reminder", "end": "2024-11-22T18:30:01.360Z" } ], "method": "PUBLISH" } }, { "date": "In 5 Tagen 19:00-22:00", "event": "Ausschusssitzung", "_class": "ical_Feuerwehr ical_5days", "_date": "2024-11-26T18:00:00.000Z", "_end": "2024-11-26T21:00:00.000Z", "_IDID": "Kalender8@google.com", "_allDay": false, "_private": false, "_rule": " ", "location": "FGH BDorf", "_calName": "Feuerwehr", "_calColor": "#FF0F02", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-26T18:00:00.000Z", "datetype": "date-time", "end": "2024-11-26T21:00:00.000Z", "dtstamp": "2024-11-21T18:30:01.000Z", "uid": "Kalender8@google.com", "created": "2024-10-01T19:49:42.000Z", "lastmodified": "2024-10-01T19:49:42.000Z", "location": "FGH BDorf", "sequence": "0", "status": "CONFIRMED", "summary": "Ausschusssitzung", "transparency": "OPAQUE", "method": "PUBLISH" } }, { "date": "29.11.2024 20:00-23:00", "event": "Herbstdienstversammlung", "_class": "ical_Feuerwehr ", "_date": "2024-11-29T19:00:00.000Z", "_end": "2024-11-29T22:00:00.000Z", "_IDID": "Kalender8@google.com", "_allDay": false, "_private": false, "_rule": " ", "location": "CStadt", "_calName": "Feuerwehr", "_calColor": "#FF0F02", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-29T19:00:00.000Z", "datetype": "date-time", "end": "2024-11-29T22:00:00.000Z", "dtstamp": "2024-11-21T18:30:01.000Z", "uid": "Kalender8@google.com", "created": "2024-10-17T12:57:23.000Z", "lastmodified": "2024-11-21T17:41:05.000Z", "location": "CStadt", "sequence": "1", "status": "CONFIRMED", "summary": "Herbstdienstversammlung", "transparency": "OPAQUE", "method": "PUBLISH" } } ] ]
dann kann man es auch so machen:
https://try.jsonata.org/MAznZ46uM$.$.{"date": _allDay ? $trim(date) : $match(date,/(.*?)\s(\d+:\d+-\d+:\d+)/).groups[0], "time": _allDay ? "Ganztägig" : $match(date,/(.*?)\s(\d+:\d+-\d+:\d+)/).groups[1], "event":event}
Das erzeugt dann aus Deinen 3 Arrays EIN Array mit Deinen Events:
oder in schön:
[ { "date": "In 5 Tagen", "time": "Ganztägig", "event": "Restmüll in ADorf" }, { "date": "05.12.2024", "time": "Ganztägig", "event": "Papiertonne in ADorf" }, { "date": "10.12.2024", "time": "Ganztägig", "event": "Restmüll in ADorf" }, { "date": "13.12.2024", "time": "Ganztägig", "event": "Gelber Sack in ADorf" }, { "date": "23.12.2024", "time": "Ganztägig", "event": "Restmüll in ADorf" }, { "date": "Heute", "time": "14:00-15:00", "event": "Auto Werkstatt" }, { "date": "Heute", "time": "15:00-16:00", "event": "Zahnarzt" }, { "date": "Morgen", "time": "20:30-21:30", "event": "Besprechung" }, { "date": "Übermorgen", "time": "09:00-10:00", "event": "Frühstücken" }, { "date": "In 6 Tagen", "time": "07:00-07:30", "event": "Geburtstag1" }, { "date": "14.12.2024", "time": "07:00-07:30", "event": "Geburtstag2" }, { "date": "In 4 Tagen", "time": "16:00-17:00", "event": "Zahnarzt" }, { "date": "In 5 Tagen", "time": "19:00-22:00", "event": "Ausschusssitzung" }, { "date": "29.11.2024", "time": "20:00-23:00", "event": "Herbstdienstversammlung" } ]
Hier das Blockly zum Import - wie gesagt - die erste Umwandlung in ein Objekt kannst Du ja Deinen Datenpunkt ggf nehmen und entweder die Lösung mit den einzelnen Arrays oder mit einem verschachtelten Array nehmen:
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="b!0jb/[jhFf55EerOjfO">ical Rohdaten</variable> <variable id=";etAPfplOG(e^myB{@YA">Deine Events</variable> </variables> <block type="variables_set" id="L]#%GpbNip9LJ%NXaK.1" x="88" y="38"> <field name="VAR" id="b!0jb/[jhFf55EerOjfO">ical Rohdaten</field> <value name="VALUE"> <block type="convert_json2object" id="UJ@CFa;TLwLP3I??thN$"> <value name="VALUE"> <block type="text" id="hr_#=V(8-fxiPT}vldk="> <field name="TEXT">[ [ { "date": "In 5 Tagen ", "event": "Restmüll in ADorf", "_class": "ical_Abfall ical_5days", "_date": "2024-11-25T23:00:00.000Z", "_end": "2024-11-26T23:00:00.000Z", "_IDID": "AWIDO-RM-20241126T000000", "_allDay": true, "_private": false, "_rule": " ", "location": "ADorf; Zuhause (ADorf)", "_calName": "Abfall", "_calColor": "#919189", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-25T23:00:00.000Z", "datetype": "date", "end": "2024-11-26T23:00:00.000Z", "dtstamp": "2024-11-20T23:00:09.000Z", "uid": "AWIDO-RM-20241126T000000", "url": "x.y.de", "class": "PUBLIC", "created": "2024-01-01T00:00:00.000Z", "lastmodified": "2024-01-01T09:43:11.000Z", "location": "ADorf; Zuhause (ADorf)", "sequence": "0", "status": "CONFIRMED", "summary": "Restmüll in ADorf", "transparency": "TRANSPARENT", "method": "PUBLISH" } }, { "date": "05.12.2024 ", "event": "Papiertonne in ADorf", "_class": "ical_Abfall ", "_date": "2024-12-04T23:00:00.000Z", "_end": "2024-12-05T23:00:00.000Z", "_IDID": "AWIDO-PT-20241205T000000", "_allDay": true, "_private": false, "_rule": " ", "location": "ADorf; Zuhause (ADorf)", "_calName": "Abfall", "_calColor": "#919189", "_object": { "type": "VEVENT", "params": [], "start": "2024-12-04T23:00:00.000Z", "datetype": "date", "end": "2024-12-05T23:00:00.000Z", "dtstamp": "2024-11-20T23:00:09.000Z", "uid": "AWIDO-PT-20241205T000000", "url": "x.y.de", "class": "PUBLIC", "created": "2024-01-01T00:00:00.000Z", "lastmodified": "2024-01-01T09:43:11.000Z", "location": "ADorf; Zuhause (ADorf)", "sequence": "0", "status": "CONFIRMED", "summary": "Papiertonne in ADorf", "transparency": "TRANSPARENT", "method": "PUBLISH" } }, { "date": "10.12.2024 ", "event": "Restmüll in ADorf", "_class": "ical_Abfall ", "_date": "2024-12-09T23:00:00.000Z", "_end": "2024-12-10T23:00:00.000Z", "_IDID": "AWIDO-RM-20241210T000000", "_allDay": true, "_private": false, "_rule": " ", "location": "ADorf; Zuhause (ADorf)", "_calName": "Abfall", "_calColor": "#919189", "_object": { "type": "VEVENT", "params": [], "start": "2024-12-09T23:00:00.000Z", "datetype": "date", "end": "2024-12-10T23:00:00.000Z", "dtstamp": "2024-11-20T23:00:09.000Z", "uid": "AWIDO-RM-20241210T000000", "url": "x.y.de", "class": "PUBLIC", "created": "2024-01-01T00:00:00.000Z", "lastmodified": "2024-01-01T09:43:11.000Z", "location": "ADorf; Zuhause (ADorf)", "sequence": "0", "status": "CONFIRMED", "summary": "Restmüll in ADorf", "transparency": "TRANSPARENT", "method": "PUBLISH" } }, { "date": "13.12.2024 ", "event": "Gelber Sack in ADorf", "_class": "ical_Abfall ", "_date": "2024-12-12T23:00:00.000Z", "_end": "2024-12-13T23:00:00.000Z", "_IDID": "AWIDO-GS-20241212T000000", "_allDay": true, "_private": false, "_rule": " ", "location": "ADorf; Zuhause (ADorf)", "_calName": "Abfall", "_calColor": "#919189", "_object": { "type": "VEVENT", "params": [], "start": "2024-12-12T23:00:00.000Z", "datetype": "date", "end": "2024-12-13T23:00:00.000Z", "dtstamp": "2024-11-20T23:00:09.000Z", "uid": "AWIDO-GS-20241212T000000", "class": "PUBLIC", "created": "2024-01-01T00:00:00.000Z", "lastmodified": "2024-01-18T12:47:52.000Z", "location": "ADorf; Zuhause (ADorf)", "sequence": "1", "status": "CONFIRMED", "summary": "Gelber Sack in ADorf", "transparency": "TRANSPARENT", "method": "PUBLISH" } }, { "date": "23.12.2024 ", "event": "Restmüll in ADorf", "_class": "ical_Abfall ", "_date": "2024-12-22T23:00:00.000Z", "_end": "2024-12-23T23:00:00.000Z", "_IDID": "AWIDO-RM-20241223T000000", "_allDay": true, "_private": false, "_rule": " ", "location": "ADorf; Zuhause (ADorf)", "_calName": "Abfall", "_calColor": "#919189", "_object": { "type": "VEVENT", "params": [], "start": "2024-12-22T23:00:00.000Z", "datetype": "date", "end": "2024-12-23T23:00:00.000Z", "dtstamp": "2024-11-20T23:00:09.000Z", "uid": "AWIDO-RM-20241223T000000", "url": "x.y.de", "class": "PUBLIC", "created": "2024-01-01T00:00:00.000Z", "lastmodified": "2024-01-01T09:43:11.000Z", "location": "ADorf; Zuhause (ADorf)", "sequence": "0", "status": "CONFIRMED", "summary": "Restmüll in ADorf", "transparency": "TRANSPARENT", "method": "PUBLISH" } } ], [ { "date": "Heute 14:00-15:00", "event": "Auto Werkstatt", "_class": "ical_Familie ical_today", "_date": "2024-11-21T13:00:00.000Z", "_end": "2024-11-21T14:00:00.000Z", "_IDID": "kalender1@google.com", "_allDay": false, "_private": false, "_rule": " ", "location": "", "_calName": "Familie", "_calColor": "#07fab7", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-21T13:00:00.000Z", "datetype": "date-time", "end": "2024-11-21T14:00:00.000Z", "dtstamp": "2024-11-20T23:00:17.000Z", "uid": "kalender1@google.com", "created": "2024-11-14T12:55:27.000Z", "lastmodified": "2024-11-14T12:55:27.000Z", "sequence": "0", "status": "CONFIRMED", "summary": "Auto Werkstatt", "transparency": "OPAQUE", "alarms": [ { "type": "VALARM", "params": [], "action": "DISPLAY", "trigger": "-P0DT0H15M0S", "description": "This is an event reminder", "end": "2024-11-21T23:00:17.375Z" } ], "method": "PUBLISH" } }, { "date": "Heute 15:00-16:00", "event": "Zahnarzt", "_class": "ical_Familie ical_today", "_date": "2024-11-21T14:00:00.000Z", "_end": "2024-11-21T15:00:00.000Z", "_IDID": "kalender2@google.com", "_allDay": false, "_private": false, "_rule": " ", "location": "", "_calName": "Familie", "_calColor": "#07fab7", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-21T14:00:00.000Z", "datetype": "date-time", "end": "2024-11-21T15:00:00.000Z", "dtstamp": "2024-11-20T23:00:17.000Z", "uid": "kalender2@google.com", "created": "2024-06-18T14:55:33.000Z", "lastmodified": "2024-06-18T14:55:33.000Z", "sequence": "0", "status": "CONFIRMED", "summary": "Zahnarzt", "transparency": "OPAQUE", "alarms": [ { "type": "VALARM", "params": [], "action": "DISPLAY", "trigger": "-P0DT0H15M0S", "description": "This is an event reminder", "end": "2024-11-21T23:00:17.373Z" } ], "method": "PUBLISH" } }, { "date": "Morgen 20:30-21:30", "event": "Besprechung", "_class": "ical_GeburtstageFamilie ical_tomorrow", "_date": "2024-11-22T19:30:00.000Z", "_end": "2024-11-22T20:30:00.000Z", "_IDID": "Kalender3@google.com", "_allDay": false, "_private": false, "_rule": " ", "location": "", "_calName": "GeburtstageFamilie", "_calColor": "#06aa2c", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-22T19:30:00.000Z", "datetype": "date-time", "end": "2024-11-22T20:30:00.000Z", "dtstamp": "2024-11-20T23:00:17.000Z", "uid": "Kalender3@google.com", "created": "2024-11-18T18:59:18.000Z", "lastmodified": "2024-11-18T18:59:18.000Z", "sequence": "0", "status": "CONFIRMED", "summary": "Besprechung", "transparency": "OPAQUE", "method": "PUBLISH" } }, { "date": "Übermorgen 09:00-10:00", "event": "Frühstücken", "_class": "ical_Familie ical_dayafter", "_date": "2024-11-23T08:00:00.000Z", "_end": "2024-11-23T09:00:00.000Z", "_IDID": "Kalender4l@google.com", "_allDay": false, "_private": false, "_rule": " ", "location": "", "_calName": "Familie", "_calColor": "#07fab7", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-23T08:00:00.000Z", "datetype": "date-time", "end": "2024-11-23T09:00:00.000Z", "dtstamp": "2024-11-20T23:00:17.000Z", "uid": "Kalender4l@google.com", "created": "2024-10-29T07:11:21.000Z", "lastmodified": "2024-10-29T07:11:21.000Z", "sequence": "0", "status": "CONFIRMED", "summary": "Frühstücken", "transparency": "OPAQUE", "alarms": [ { "type": "VALARM", "params": [], "action": "DISPLAY", "trigger": "-P0DT0H15M0S", "description": "This is an event reminder", "end": "2024-11-21T23:00:17.375Z" } ], "method": "PUBLISH" } }, { "date": "In 6 Tagen 07:00-07:30", "event": "Geburtstag1", "_class": "ical_GeburtstageFamilie ical_6days", "_date": "2024-11-27T06:00:00.000Z", "_end": "2024-11-27T06:30:00.000Z", "_section": "<span><span>1967</span> <br></span>", "_IDID": "kalender5@google.com", "_allDay": false, "_private": false, "_rule": " rrule ", "location": "Zuhause", "_calName": "GeburtstageFamilie", "_calColor": "#06aa2c", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-27T06:00:00.000Z", "datetype": "date-time", "end": "2024-11-27T06:30:00.000Z", "rrule": { "_cache": { "all": false, "before": [], "after": [], "between": [] }, "origOptions": { "tzid": "Europe/Berlin", "dtstart": "1967-11-27T06:00:00.000Z", "freq": 0 }, "options": { "freq": 0, "dtstart": "1967-11-27T06:00:00.000Z", "interval": 1, "wkst": 0, "count": null, "until": null, "tzid": "Europe/Berlin", "bysetpos": null, "bymonth": [ 11 ], "bymonthday": [ 27 ], "bynmonthday": [], "byyearday": null, "byweekno": null, "byweekday": null, "bynweekday": null, "byhour": [ 6 ], "byminute": [ 0 ], "bysecond": [ 0 ], "byeaster": null } }, "dtstamp": "2024-11-20T23:00:17.000Z", "uid": "Kalender5@google.com", "created": "2021-01-31T19:24:01.000Z", "description": "<span><span>1967</span> <br></span>", "lastmodified": "2021-01-31T19:24:01.000Z", "location": "Zuhause", "sequence": "0", "status": "CONFIRMED", "summary": "Geburtstag1", "transparency": "OPAQUE", "method": "PUBLISH" } }, { "date": "14.12.2024 07:00-07:30", "event": "Geburtstag2", "_class": "ical_GeburtstageFamilie ", "_date": "2024-12-14T06:00:00.000Z", "_end": "2024-12-14T06:30:00.000Z", "_section": "2019", "_IDID": "Kalender6@google.com", "_allDay": false, "_private": false, "_rule": " rrule ", "location": "Los Angeles", "_calName": "GeburtstageFamilie", "_calColor": "#06aa2c", "_object": { "type": "VEVENT", "params": [], "start": "2024-12-14T06:00:00.000Z", "datetype": "date-time", "end": "2024-12-14T06:30:00.000Z", "rrule": { "_cache": { "all": false, "before": [], "after": [], "between": [] }, "origOptions": { "tzid": "Europe/Berlin", "dtstart": "2019-12-14T06:00:00.000Z", "freq": 0, "bymonthday": 14, "bymonth": 12 }, "options": { "freq": 0, "dtstart": "2019-12-14T06:00:00.000Z", "interval": 1, "wkst": 0, "count": null, "until": null, "tzid": "Europe/Berlin", "bysetpos": null, "bymonth": [ 12 ], "bymonthday": [ 14 ], "bynmonthday": [], "byyearday": null, "byweekno": null, "byweekday": null, "bynweekday": null, "byhour": [ 6 ], "byminute": [ 0 ], "bysecond": [ 0 ], "byeaster": null } }, "dtstamp": "2024-11-20T23:00:17.000Z", "uid": "Kalender6@google.com", "created": "2021-01-30T16:15:33.000Z", "description": "2019", "lastmodified": "2021-01-30T16:15:33.000Z", "location": "Los Angeles", "sequence": "0", "status": "CONFIRMED", "summary": "Geburtstag2", "transparency": "OPAQUE", "method": "PUBLISH" } } ], [ { "date": "In 4 Tagen 16:00-17:00", "event": "Zahnarzt", "_class": "ical_ich ical_4days", "_date": "2024-11-25T15:00:00.000Z", "_end": "2024-11-25T16:00:00.000Z", "_IDID": "Kalender7@google.com", "_allDay": false, "_private": false, "_rule": " ", "location": "", "_calName": "ich", "_calColor": "#1557f0", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-25T15:00:00.000Z", "datetype": "date-time", "end": "2024-11-25T16:00:00.000Z", "dtstamp": "2024-11-21T18:30:01.000Z", "uid": "Kalender7@google.com", "created": "2024-10-31T05:31:42.000Z", "lastmodified": "2024-10-31T05:31:42.000Z", "sequence": "0", "status": "CONFIRMED", "summary": "Zahnarzt", "transparency": "OPAQUE", "alarms": [ { "type": "VALARM", "params": [], "action": "DISPLAY", "trigger": "-P0DT1H0M0S", "description": "This is an event reminder", "end": "2024-11-22T18:30:01.360Z" } ], "method": "PUBLISH" } }, { "date": "In 5 Tagen 19:00-22:00", "event": "Ausschusssitzung", "_class": "ical_Feuerwehr ical_5days", "_date": "2024-11-26T18:00:00.000Z", "_end": "2024-11-26T21:00:00.000Z", "_IDID": "Kalender8@google.com", "_allDay": false, "_private": false, "_rule": " ", "location": "FGH BDorf", "_calName": "Feuerwehr", "_calColor": "#FF0F02", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-26T18:00:00.000Z", "datetype": "date-time", "end": "2024-11-26T21:00:00.000Z", "dtstamp": "2024-11-21T18:30:01.000Z", "uid": "Kalender8@google.com", "created": "2024-10-01T19:49:42.000Z", "lastmodified": "2024-10-01T19:49:42.000Z", "location": "FGH BDorf", "sequence": "0", "status": "CONFIRMED", "summary": "Ausschusssitzung", "transparency": "OPAQUE", "method": "PUBLISH" } }, { "date": "29.11.2024 20:00-23:00", "event": "Herbstdienstversammlung", "_class": "ical_Feuerwehr ", "_date": "2024-11-29T19:00:00.000Z", "_end": "2024-11-29T22:00:00.000Z", "_IDID": "Kalender8@google.com", "_allDay": false, "_private": false, "_rule": " ", "location": "CStadt", "_calName": "Feuerwehr", "_calColor": "#FF0F02", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-29T19:00:00.000Z", "datetype": "date-time", "end": "2024-11-29T22:00:00.000Z", "dtstamp": "2024-11-21T18:30:01.000Z", "uid": "Kalender8@google.com", "created": "2024-10-17T12:57:23.000Z", "lastmodified": "2024-11-21T17:41:05.000Z", "location": "CStadt", "sequence": "1", "status": "CONFIRMED", "summary": "Herbstdienstversammlung", "transparency": "OPAQUE", "method": "PUBLISH" } } ] ]</field> </block> </value> </block> </value> <next> <block type="debug" id="|oA@DTZSQBI6_N3S0X07"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="FT7ds^UZ%C?*=R/WI|U("> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="$77b?vq+=dE)ii32RuLf"> <field name="VAR" id="b!0jb/[jhFf55EerOjfO">ical Rohdaten</field> </block> </value> <next> <block type="comment" id="}vHxg,ol]I?poy=BaOrS"> <field name="COMMENT">Eigenes Objekt</field> <next> <block type="variables_set" id="kn(VwRU=b_@aj$r]cP73"> <field name="VAR" id=";etAPfplOG(e^myB{@YA">Deine Events</field> <value name="VALUE"> <block type="convert_jsonata" id="$T*n-e{Z8:H!Qc,v.w(e"> <value name="EXPRESSION"> <shadow type="text" id=".SrMN@T{h`Z2xD-gb6=R"> <field name="TEXT">$.$.{"date": _allDay ? $trim(date) : $match(date,/(.*?)\s(\d+:\d+-\d+:\d+)/).groups[0], "time": _allDay ? "Ganztägig" : $match(date,/(.*?)\s(\d+:\d+-\d+:\d+)/).groups[1], "event":event}</field> </shadow> </value> <value name="TARGET"> <block type="variables_get" id="bPy|A{U?m-E22yM*[`B="> <field name="VAR" id="b!0jb/[jhFf55EerOjfO">ical Rohdaten</field> </block> </value> </block> </value> <next> <block type="debug" id="a*sCM{jp8$(;D{W*hSXy"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="+R6p967R=OQllqij0z;b"> <field name="TEXT">test</field> </shadow> <block type="lists_getSublist" id="4u8v}XytK$t,:mm`/-+x"> <mutation at1="false" at2="false"></mutation> <field name="WHERE1">FIRST</field> <field name="WHERE2">LAST</field> <value name="LIST"> <block type="variables_get" id="d}zTLG@E=m.SgVaxPBul"> <field name="VAR" id=";etAPfplOG(e^myB{@YA">Deine Events</field> </block> </value> </block> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </xml>
Will man das verschachtelte Array behalten und das Ergebnis nicht mergen, um es wieder aufzuteilen, dann ist die Syntax folgende:
$.[$.{"date": _allDay ? $trim(date) : $match(date,/(.*?)\s(\d+:\d+-\d+:\d+)/).groups[0], "time": _allDay ? "Ganztägig" : $match(date,/(.*?)\s(\d+:\d+-\d+:\d+)/).groups[1], "event":event}]
siehe hier: https://try.jsonata.org/h4GpiGI8T
So kannst Du dann auch das Ergebnis wieder aufteilen, falls Du die Listen oben gemergt hast (so wie ich das gemacht habe, um Code zu sparen).
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="b!0jb/[jhFf55EerOjfO">ical Rohdaten</variable> <variable id=";etAPfplOG(e^myB{@YA">Deine Events</variable> <variable id=".MS.U)E#^IcwfxSx4)ut">Teilliste</variable> </variables> <block type="variables_set" id="L]#%GpbNip9LJ%NXaK.1" x="88" y="38"> <field name="VAR" id="b!0jb/[jhFf55EerOjfO">ical Rohdaten</field> <value name="VALUE"> <block type="convert_json2object" id="UJ@CFa;TLwLP3I??thN$"> <value name="VALUE"> <block type="text" id="hr_#=V(8-fxiPT}vldk="> <field name="TEXT">[ [ { "date": "In 5 Tagen ", "event": "Restmüll in ADorf", "_class": "ical_Abfall ical_5days", "_date": "2024-11-25T23:00:00.000Z", "_end": "2024-11-26T23:00:00.000Z", "_IDID": "AWIDO-RM-20241126T000000", "_allDay": true, "_private": false, "_rule": " ", "location": "ADorf; Zuhause (ADorf)", "_calName": "Abfall", "_calColor": "#919189", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-25T23:00:00.000Z", "datetype": "date", "end": "2024-11-26T23:00:00.000Z", "dtstamp": "2024-11-20T23:00:09.000Z", "uid": "AWIDO-RM-20241126T000000", "url": "x.y.de", "class": "PUBLIC", "created": "2024-01-01T00:00:00.000Z", "lastmodified": "2024-01-01T09:43:11.000Z", "location": "ADorf; Zuhause (ADorf)", "sequence": "0", "status": "CONFIRMED", "summary": "Restmüll in ADorf", "transparency": "TRANSPARENT", "method": "PUBLISH" } }, { "date": "05.12.2024 ", "event": "Papiertonne in ADorf", "_class": "ical_Abfall ", "_date": "2024-12-04T23:00:00.000Z", "_end": "2024-12-05T23:00:00.000Z", "_IDID": "AWIDO-PT-20241205T000000", "_allDay": true, "_private": false, "_rule": " ", "location": "ADorf; Zuhause (ADorf)", "_calName": "Abfall", "_calColor": "#919189", "_object": { "type": "VEVENT", "params": [], "start": "2024-12-04T23:00:00.000Z", "datetype": "date", "end": "2024-12-05T23:00:00.000Z", "dtstamp": "2024-11-20T23:00:09.000Z", "uid": "AWIDO-PT-20241205T000000", "url": "x.y.de", "class": "PUBLIC", "created": "2024-01-01T00:00:00.000Z", "lastmodified": "2024-01-01T09:43:11.000Z", "location": "ADorf; Zuhause (ADorf)", "sequence": "0", "status": "CONFIRMED", "summary": "Papiertonne in ADorf", "transparency": "TRANSPARENT", "method": "PUBLISH" } }, { "date": "10.12.2024 ", "event": "Restmüll in ADorf", "_class": "ical_Abfall ", "_date": "2024-12-09T23:00:00.000Z", "_end": "2024-12-10T23:00:00.000Z", "_IDID": "AWIDO-RM-20241210T000000", "_allDay": true, "_private": false, "_rule": " ", "location": "ADorf; Zuhause (ADorf)", "_calName": "Abfall", "_calColor": "#919189", "_object": { "type": "VEVENT", "params": [], "start": "2024-12-09T23:00:00.000Z", "datetype": "date", "end": "2024-12-10T23:00:00.000Z", "dtstamp": "2024-11-20T23:00:09.000Z", "uid": "AWIDO-RM-20241210T000000", "url": "x.y.de", "class": "PUBLIC", "created": "2024-01-01T00:00:00.000Z", "lastmodified": "2024-01-01T09:43:11.000Z", "location": "ADorf; Zuhause (ADorf)", "sequence": "0", "status": "CONFIRMED", "summary": "Restmüll in ADorf", "transparency": "TRANSPARENT", "method": "PUBLISH" } }, { "date": "13.12.2024 ", "event": "Gelber Sack in ADorf", "_class": "ical_Abfall ", "_date": "2024-12-12T23:00:00.000Z", "_end": "2024-12-13T23:00:00.000Z", "_IDID": "AWIDO-GS-20241212T000000", "_allDay": true, "_private": false, "_rule": " ", "location": "ADorf; Zuhause (ADorf)", "_calName": "Abfall", "_calColor": "#919189", "_object": { "type": "VEVENT", "params": [], "start": "2024-12-12T23:00:00.000Z", "datetype": "date", "end": "2024-12-13T23:00:00.000Z", "dtstamp": "2024-11-20T23:00:09.000Z", "uid": "AWIDO-GS-20241212T000000", "class": "PUBLIC", "created": "2024-01-01T00:00:00.000Z", "lastmodified": "2024-01-18T12:47:52.000Z", "location": "ADorf; Zuhause (ADorf)", "sequence": "1", "status": "CONFIRMED", "summary": "Gelber Sack in ADorf", "transparency": "TRANSPARENT", "method": "PUBLISH" } }, { "date": "23.12.2024 ", "event": "Restmüll in ADorf", "_class": "ical_Abfall ", "_date": "2024-12-22T23:00:00.000Z", "_end": "2024-12-23T23:00:00.000Z", "_IDID": "AWIDO-RM-20241223T000000", "_allDay": true, "_private": false, "_rule": " ", "location": "ADorf; Zuhause (ADorf)", "_calName": "Abfall", "_calColor": "#919189", "_object": { "type": "VEVENT", "params": [], "start": "2024-12-22T23:00:00.000Z", "datetype": "date", "end": "2024-12-23T23:00:00.000Z", "dtstamp": "2024-11-20T23:00:09.000Z", "uid": "AWIDO-RM-20241223T000000", "url": "x.y.de", "class": "PUBLIC", "created": "2024-01-01T00:00:00.000Z", "lastmodified": "2024-01-01T09:43:11.000Z", "location": "ADorf; Zuhause (ADorf)", "sequence": "0", "status": "CONFIRMED", "summary": "Restmüll in ADorf", "transparency": "TRANSPARENT", "method": "PUBLISH" } } ], [ { "date": "Heute 14:00-15:00", "event": "Auto Werkstatt", "_class": "ical_Familie ical_today", "_date": "2024-11-21T13:00:00.000Z", "_end": "2024-11-21T14:00:00.000Z", "_IDID": "kalender1@google.com", "_allDay": false, "_private": false, "_rule": " ", "location": "", "_calName": "Familie", "_calColor": "#07fab7", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-21T13:00:00.000Z", "datetype": "date-time", "end": "2024-11-21T14:00:00.000Z", "dtstamp": "2024-11-20T23:00:17.000Z", "uid": "kalender1@google.com", "created": "2024-11-14T12:55:27.000Z", "lastmodified": "2024-11-14T12:55:27.000Z", "sequence": "0", "status": "CONFIRMED", "summary": "Auto Werkstatt", "transparency": "OPAQUE", "alarms": [ { "type": "VALARM", "params": [], "action": "DISPLAY", "trigger": "-P0DT0H15M0S", "description": "This is an event reminder", "end": "2024-11-21T23:00:17.375Z" } ], "method": "PUBLISH" } }, { "date": "Heute 15:00-16:00", "event": "Zahnarzt", "_class": "ical_Familie ical_today", "_date": "2024-11-21T14:00:00.000Z", "_end": "2024-11-21T15:00:00.000Z", "_IDID": "kalender2@google.com", "_allDay": false, "_private": false, "_rule": " ", "location": "", "_calName": "Familie", "_calColor": "#07fab7", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-21T14:00:00.000Z", "datetype": "date-time", "end": "2024-11-21T15:00:00.000Z", "dtstamp": "2024-11-20T23:00:17.000Z", "uid": "kalender2@google.com", "created": "2024-06-18T14:55:33.000Z", "lastmodified": "2024-06-18T14:55:33.000Z", "sequence": "0", "status": "CONFIRMED", "summary": "Zahnarzt", "transparency": "OPAQUE", "alarms": [ { "type": "VALARM", "params": [], "action": "DISPLAY", "trigger": "-P0DT0H15M0S", "description": "This is an event reminder", "end": "2024-11-21T23:00:17.373Z" } ], "method": "PUBLISH" } }, { "date": "Morgen 20:30-21:30", "event": "Besprechung", "_class": "ical_GeburtstageFamilie ical_tomorrow", "_date": "2024-11-22T19:30:00.000Z", "_end": "2024-11-22T20:30:00.000Z", "_IDID": "Kalender3@google.com", "_allDay": false, "_private": false, "_rule": " ", "location": "", "_calName": "GeburtstageFamilie", "_calColor": "#06aa2c", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-22T19:30:00.000Z", "datetype": "date-time", "end": "2024-11-22T20:30:00.000Z", "dtstamp": "2024-11-20T23:00:17.000Z", "uid": "Kalender3@google.com", "created": "2024-11-18T18:59:18.000Z", "lastmodified": "2024-11-18T18:59:18.000Z", "sequence": "0", "status": "CONFIRMED", "summary": "Besprechung", "transparency": "OPAQUE", "method": "PUBLISH" } }, { "date": "Übermorgen 09:00-10:00", "event": "Frühstücken", "_class": "ical_Familie ical_dayafter", "_date": "2024-11-23T08:00:00.000Z", "_end": "2024-11-23T09:00:00.000Z", "_IDID": "Kalender4l@google.com", "_allDay": false, "_private": false, "_rule": " ", "location": "", "_calName": "Familie", "_calColor": "#07fab7", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-23T08:00:00.000Z", "datetype": "date-time", "end": "2024-11-23T09:00:00.000Z", "dtstamp": "2024-11-20T23:00:17.000Z", "uid": "Kalender4l@google.com", "created": "2024-10-29T07:11:21.000Z", "lastmodified": "2024-10-29T07:11:21.000Z", "sequence": "0", "status": "CONFIRMED", "summary": "Frühstücken", "transparency": "OPAQUE", "alarms": [ { "type": "VALARM", "params": [], "action": "DISPLAY", "trigger": "-P0DT0H15M0S", "description": "This is an event reminder", "end": "2024-11-21T23:00:17.375Z" } ], "method": "PUBLISH" } }, { "date": "In 6 Tagen 07:00-07:30", "event": "Geburtstag1", "_class": "ical_GeburtstageFamilie ical_6days", "_date": "2024-11-27T06:00:00.000Z", "_end": "2024-11-27T06:30:00.000Z", "_section": "<span><span>1967</span> <br></span>", "_IDID": "kalender5@google.com", "_allDay": false, "_private": false, "_rule": " rrule ", "location": "Zuhause", "_calName": "GeburtstageFamilie", "_calColor": "#06aa2c", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-27T06:00:00.000Z", "datetype": "date-time", "end": "2024-11-27T06:30:00.000Z", "rrule": { "_cache": { "all": false, "before": [], "after": [], "between": [] }, "origOptions": { "tzid": "Europe/Berlin", "dtstart": "1967-11-27T06:00:00.000Z", "freq": 0 }, "options": { "freq": 0, "dtstart": "1967-11-27T06:00:00.000Z", "interval": 1, "wkst": 0, "count": null, "until": null, "tzid": "Europe/Berlin", "bysetpos": null, "bymonth": [ 11 ], "bymonthday": [ 27 ], "bynmonthday": [], "byyearday": null, "byweekno": null, "byweekday": null, "bynweekday": null, "byhour": [ 6 ], "byminute": [ 0 ], "bysecond": [ 0 ], "byeaster": null } }, "dtstamp": "2024-11-20T23:00:17.000Z", "uid": "Kalender5@google.com", "created": "2021-01-31T19:24:01.000Z", "description": "<span><span>1967</span> <br></span>", "lastmodified": "2021-01-31T19:24:01.000Z", "location": "Zuhause", "sequence": "0", "status": "CONFIRMED", "summary": "Geburtstag1", "transparency": "OPAQUE", "method": "PUBLISH" } }, { "date": "14.12.2024 07:00-07:30", "event": "Geburtstag2", "_class": "ical_GeburtstageFamilie ", "_date": "2024-12-14T06:00:00.000Z", "_end": "2024-12-14T06:30:00.000Z", "_section": "2019", "_IDID": "Kalender6@google.com", "_allDay": false, "_private": false, "_rule": " rrule ", "location": "Los Angeles", "_calName": "GeburtstageFamilie", "_calColor": "#06aa2c", "_object": { "type": "VEVENT", "params": [], "start": "2024-12-14T06:00:00.000Z", "datetype": "date-time", "end": "2024-12-14T06:30:00.000Z", "rrule": { "_cache": { "all": false, "before": [], "after": [], "between": [] }, "origOptions": { "tzid": "Europe/Berlin", "dtstart": "2019-12-14T06:00:00.000Z", "freq": 0, "bymonthday": 14, "bymonth": 12 }, "options": { "freq": 0, "dtstart": "2019-12-14T06:00:00.000Z", "interval": 1, "wkst": 0, "count": null, "until": null, "tzid": "Europe/Berlin", "bysetpos": null, "bymonth": [ 12 ], "bymonthday": [ 14 ], "bynmonthday": [], "byyearday": null, "byweekno": null, "byweekday": null, "bynweekday": null, "byhour": [ 6 ], "byminute": [ 0 ], "bysecond": [ 0 ], "byeaster": null } }, "dtstamp": "2024-11-20T23:00:17.000Z", "uid": "Kalender6@google.com", "created": "2021-01-30T16:15:33.000Z", "description": "2019", "lastmodified": "2021-01-30T16:15:33.000Z", "location": "Los Angeles", "sequence": "0", "status": "CONFIRMED", "summary": "Geburtstag2", "transparency": "OPAQUE", "method": "PUBLISH" } } ], [ { "date": "In 4 Tagen 16:00-17:00", "event": "Zahnarzt", "_class": "ical_ich ical_4days", "_date": "2024-11-25T15:00:00.000Z", "_end": "2024-11-25T16:00:00.000Z", "_IDID": "Kalender7@google.com", "_allDay": false, "_private": false, "_rule": " ", "location": "", "_calName": "ich", "_calColor": "#1557f0", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-25T15:00:00.000Z", "datetype": "date-time", "end": "2024-11-25T16:00:00.000Z", "dtstamp": "2024-11-21T18:30:01.000Z", "uid": "Kalender7@google.com", "created": "2024-10-31T05:31:42.000Z", "lastmodified": "2024-10-31T05:31:42.000Z", "sequence": "0", "status": "CONFIRMED", "summary": "Zahnarzt", "transparency": "OPAQUE", "alarms": [ { "type": "VALARM", "params": [], "action": "DISPLAY", "trigger": "-P0DT1H0M0S", "description": "This is an event reminder", "end": "2024-11-22T18:30:01.360Z" } ], "method": "PUBLISH" } }, { "date": "In 5 Tagen 19:00-22:00", "event": "Ausschusssitzung", "_class": "ical_Feuerwehr ical_5days", "_date": "2024-11-26T18:00:00.000Z", "_end": "2024-11-26T21:00:00.000Z", "_IDID": "Kalender8@google.com", "_allDay": false, "_private": false, "_rule": " ", "location": "FGH BDorf", "_calName": "Feuerwehr", "_calColor": "#FF0F02", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-26T18:00:00.000Z", "datetype": "date-time", "end": "2024-11-26T21:00:00.000Z", "dtstamp": "2024-11-21T18:30:01.000Z", "uid": "Kalender8@google.com", "created": "2024-10-01T19:49:42.000Z", "lastmodified": "2024-10-01T19:49:42.000Z", "location": "FGH BDorf", "sequence": "0", "status": "CONFIRMED", "summary": "Ausschusssitzung", "transparency": "OPAQUE", "method": "PUBLISH" } }, { "date": "29.11.2024 20:00-23:00", "event": "Herbstdienstversammlung", "_class": "ical_Feuerwehr ", "_date": "2024-11-29T19:00:00.000Z", "_end": "2024-11-29T22:00:00.000Z", "_IDID": "Kalender8@google.com", "_allDay": false, "_private": false, "_rule": " ", "location": "CStadt", "_calName": "Feuerwehr", "_calColor": "#FF0F02", "_object": { "type": "VEVENT", "params": [], "start": "2024-11-29T19:00:00.000Z", "datetype": "date-time", "end": "2024-11-29T22:00:00.000Z", "dtstamp": "2024-11-21T18:30:01.000Z", "uid": "Kalender8@google.com", "created": "2024-10-17T12:57:23.000Z", "lastmodified": "2024-11-21T17:41:05.000Z", "location": "CStadt", "sequence": "1", "status": "CONFIRMED", "summary": "Herbstdienstversammlung", "transparency": "OPAQUE", "method": "PUBLISH" } } ] ]</field> </block> </value> </block> </value> <next> <block type="debug" id="|oA@DTZSQBI6_N3S0X07"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="FT7ds^UZ%C?*=R/WI|U("> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="$77b?vq+=dE)ii32RuLf"> <field name="VAR" id="b!0jb/[jhFf55EerOjfO">ical Rohdaten</field> </block> </value> <next> <block type="comment" id="}vHxg,ol]I?poy=BaOrS"> <field name="COMMENT">Eigenes Objekt</field> <next> <block type="variables_set" id="kn(VwRU=b_@aj$r]cP73"> <field name="VAR" id=";etAPfplOG(e^myB{@YA">Deine Events</field> <value name="VALUE"> <block type="convert_jsonata" id="$T*n-e{Z8:H!Qc,v.w(e"> <value name="EXPRESSION"> <shadow type="text" id=".SrMN@T{h`Z2xD-gb6=R"> <field name="TEXT">$.[$.{"date": _allDay ? $trim(date) : $match(date,/(.*?)\s(\d+:\d+-\d+:\d+)/).groups[0], "time": _allDay ? "Ganztägig" : $match(date,/(.*?)\s(\d+:\d+-\d+:\d+)/).groups[1], "event":event}]</field> </shadow> </value> <value name="TARGET"> <block type="variables_get" id="bPy|A{U?m-E22yM*[`B="> <field name="VAR" id="b!0jb/[jhFf55EerOjfO">ical Rohdaten</field> </block> </value> </block> </value> <next> <block type="debug" id="a*sCM{jp8$(;D{W*hSXy"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="+R6p967R=OQllqij0z;b"> <field name="TEXT">test</field> </shadow> <block type="lists_getSublist" id="4u8v}XytK$t,:mm`/-+x"> <mutation at1="false" at2="false"></mutation> <field name="WHERE1">FIRST</field> <field name="WHERE2">LAST</field> <value name="LIST"> <block type="variables_get" id="d}zTLG@E=m.SgVaxPBul"> <field name="VAR" id=";etAPfplOG(e^myB{@YA">Deine Events</field> </block> </value> </block> </value> <next> <block type="controls_forEach" id="b#a(?0a?}`5m!:|7@d/6"> <field name="VAR" id=".MS.U)E#^IcwfxSx4)ut">Teilliste</field> <value name="LIST"> <block type="variables_get" id="(7R,vPnRLRP7b-ybKoE["> <field name="VAR" id=";etAPfplOG(e^myB{@YA">Deine Events</field> </block> </value> <statement name="DO"> <block type="debug" id="!$Ap|e:k.GY)iJ|/Vfw4"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="*`7#NvcLC,Ry1WPWAPrl"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="pJo3XcD3X1m)|x;iTa?N"> <field name="VAR" id=".MS.U)E#^IcwfxSx4)ut">Teilliste</field> </block> </value> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </xml>
-
@mickym OmG, du hast dir da viel Arbeit gemacht. Vielen Dank.
Ich werd's testen und probieren. Da am Wochenende viele andere Sachen zu erledigen sind, wird das wahrscheinlich aber erst nächste Woche machbar sein.
-
Ich hab das eben probiert - funktioniert wie gewünscht. Vielen Dank!
Ich werd jetzt da noch ein bisschen weiterbasteln. Vllt. kann ich das noch anderweitig verwenden.