Contents:
Icalendar (RFC5545, RFC2445) parser/validator/generator/events enumerator : Parse, Generate and enumerate events (support of RRULE, EXRULE, RDATE, EXDATE)
This module is an icalendar parser for icalendar file (ical or ics) defined by rfc5545 (http://tools.ietf.org/html/rfc5545), which obsoleted rfc2445 (http://www.ietf.org/rfc/rfc2445.txt), which had previously replaced vcal 1.0 (http://www.imc.org/pdi/vcal-10.txt).
The icalendar file, once parsed, will be available as a typed structure. Events dates can be computed (including rrule, rdate exrule and exdates).
icalendar module and dateutils both provide some of the functionalities of this module but do not provide it in an integrated way.
Enumerator of icalendar file:
mycal = ical.ics() mycal.local_load(icsfile) mycal.parse_loaded() dates = mycal.get_event_instances(start,end) #dates will contain the json with all explicit dates of the events spec’ed by the icalendar file
0.6.1y: add support for no dtstart and/or not dtend + add support for RDATE after UNTIL
0.6.1z: add unittest support
add code for multiple rrule, exrule, add code for event_instances[‘day’]
x-components and x-properties parsing + for x-properties adding the type of data
0.6.2c: add code for x-components and x-properties generation
0.6.2d: add loader and generator for todo, alarm
0.7.x: add datetime and tzinfo
0.8.x: add support for non-standard compliance: no tzoneinfo, escaped characters, ...
Extend support to new x-properties for icalendar like events related to religious dates or celestial events
Created on Aug 4, 2011
@author: oberron @change: to 0.4 - passes all unit test in ical_test v0.1 @change: 0.4 to 0.5 adds EXDATE support @change: 0.5 to 0.6 adds support for no DTEND and DTEND computation from DURATION or DTSTART @version: 0.6.x
Icalendar (RFC5545, RFC2445) parser/validator/generator/events enumerator
Parse, Generate and enumerate events (support of RRULE, EXRULE, RDATE, EXDATE) usage:
mycal = ical.ics()
mycal.local_load(icsfile)
mycal.parse_loaded()
dates = mycal.get_event_instances(sDate,eDate)
#start end end are strings in yyyymmdd format
#dates will contain the json with all explicit dates of the events spec’ed by the icalendar file
Generates RRULE string from rules dictionary
Used by generator.
Date until which occurences of icalendar events should be returned by the enumerator
Date from which occurences of icalendar events should be returned by the enumerator
enables logging when executing (warning severe slow down)
object holding the parsed icalendar
Returns an array of events with dates, uid, and summary
The function returns the array of events within a given date window (defined by start and end), should only a certain number of events be needed either from a start date or to an end date the missing date should be set to Null
Returns generic info
loads icalendar file from local path
conformance will force / or not checking ics file for conformance (not supported yet)
parse loaded ical from file to array of typed data: self.events
Loads icalendar from array of strings
conformance will force / or not checking ics file for conformance (not supported yet)
@TODO: add here code to consolidate existing parser warnings
Parses a vevent (object from vcalendar as defined by the icalendar standard (RFC5545)
Icalendar (RFC5545, RFC2445) parser/validator/generator/events enumerator
Parse, Generate and enumerate events (support of RRULE, EXRULE, RDATE, EXDATE) usage:
mycal = ical.ics()
mycal.local_load(icsfile)
mycal.parse_loaded()
dates = mycal.get_event_instances(sDate,eDate)
#start end end are strings in yyyymmdd format
#dates will contain the json with all explicit dates of the events spec’ed by the icalendar file
Generates RRULE string from rules dictionary
Used by generator.
Date until which occurences of icalendar events should be returned by the enumerator
Date from which occurences of icalendar events should be returned by the enumerator
enables logging when executing (warning severe slow down)
object holding the parsed icalendar
Returns an array of events with dates, uid, and summary
The function returns the array of events within a given date window (defined by start and end), should only a certain number of events be needed either from a start date or to an end date the missing date should be set to Null
Returns generic info
loads icalendar file from local path
conformance will force / or not checking ics file for conformance (not supported yet)
parse loaded ical from file to array of typed data: self.events
Loads icalendar from array of strings
conformance will force / or not checking ics file for conformance (not supported yet)
@TODO: add here code to consolidate existing parser warnings