ics_analyzer/docs/ics_format.txt

80 lines
2.7 KiB
Plaintext

RFC5545
-------
https://www.rfc-editor.org/rfc/rfc5545
The iCalendar object is organized into individual lines of text,
called content lines. Content lines are delimited by a line break,
which is a CRLF sequence (CR character followed by LF character).
Lines of text SHOULD NOT be longer than 75 octets, excluding the line
break. Long content lines SHOULD be split into a multiple line
representations using a line "folding" technique. That is, a long
line can be split between any two characters by inserting a CRLF
immediately followed by a single linear white-space character (i.e.,
SPACE or HTAB). Any sequence of CRLF followed immediately by a
single linear white-space character is ignored (i.e., removed) when
processing the content type.
For example, the line:
DESCRIPTION:This is a long description that exists on a long line.
Can be represented as:
DESCRIPTION:This is a lo
ng description
that exists on a long line.
The process of moving from this folded multiple-line representation
to its single-line representation is called "unfolding". Unfolding
is accomplished by removing the CRLF and the linear white-space
character that immediately follows.
When parsing a content line, folded lines MUST first be unfolded
according to the unfolding procedure described above.
--------------------------------------------------------------------------------
Colons seem to be allowed in the "value" so you can't split by colon.
You have to split by "\r\n" but unfold the lines before.
Observation of different ics files from different sources
---------------------------------------------------------
ICS files from Microsoft Outlook differ from those that were created by Gnome Evolution.
The order of "fields" seems not be standardized and differs between every application.
Evolution
---------
all line endings are \r\n
all day event:
DTSTART;VALUE=DATE:20230908
DTEND;VALUE=DATE:20230909
an all day event can span over multiple days and look like this:
DTSTART;VALUE=DATE:20230911^M$
DTEND;VALUE=DATE:20230916^M$
The DTEND of an all day event is exclusively, it is not an all day event anymore!
appointment:
DTSTART;TZID=/freeassociation.sourceforge.net/Continent/City:
20230909T090000
DTEND;TZID=/freeassociation.sourceforge.net/Continent/City:
20230909T093000
appointments can also span over multiple days:
DTSTART;TZID=/freeassociation.sourceforge.net/Europe/Berlin:
20230913T230000
DTEND;TZID=/freeassociation.sourceforge.net/Europe/Berlin:
20230914T040000
SEQUENCE is the number of times the event was modified.
Evolution sets this to 2 after it has been generated.
Appointments include the continent and city of the used time zone.
"DESCRIPTION:" is an optional field.