Skip to content

Conversation

@marhop
Copy link

@marhop marhop commented Nov 28, 2025

Hi,

This PR deals with multiple occurences of the same key. Consider the following example input, it has several values with the EXDATE key (I think it's from a Google calendar export):

BEGIN:VCALENDAR
BEGIN:VEVENT
DTSTART;VALUE=DATE:20191010
DTEND;VALUE=DATE:20191011
RRULE:FREQ=WEEKLY;WKST=TU;UNTIL=20201007
EXDATE;VALUE=DATE:20200102
EXDATE;VALUE=DATE:20200702
EXDATE;VALUE=DATE:20200709
SUMMARY:Recurring event
END:VEVENT
END:VCALENDAR

Currently, only the last EXDATE item is preserved in the output (slightly formatted for readability):

EXDATE   SUMMARY         RRULE                              DTSTART    DTEND
20200709 Recurring event FREQ=WEEKLY;WKST=TU;UNTIL=20201007 2019-10-10 2019-10-11

With this PR applied all EXDATE items are preserved in a comma-separated list:

EXDATE                     SUMMARY         RRULE                              DTSTART    DTEND
20200102,20200702,20200709 Recurring event FREQ=WEEKLY;WKST=TU;UNTIL=20201007 2019-10-10 2019-10-11

I'm happy if you find this useful, but feel free to modify or reject it! I know next to nothing about awk programming. 😄

Cheers,
Martin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant