This is a simple script, quickly written, to improve the .ics file generated by SDWorx: if someone is off for multiple days, one even will be created per day instead of one event for the period. When there are a few people in the calendar and during the holiday period, that's hard to read.
This script will merge all events that are in sequence (even over the weekend).
Simply use:
./sdworx_calendar_merger.py <calendar.ics>
And see the result in <calendar.ics>.merged.ics
Feel free to improve the script and propose others ;-)
For some calendars, you need to force a Windows encoding:
cat Calendar.ics.merged.ics | iconv -f utf8 -t iso8859-15 > Calendar.ics.merged.iso.ics