Package modules :: Module calendar_ics :: Class SynchronizationModule
[hide private]
[frames] | no frames]

Class SynchronizationModule

source code

   pisiinterfaces.AbstractSynchronizationModule --+    
                                                  |    
events.events.AbstractCalendarSynchronizationModule --+
                                                      |
                                                     SynchronizationModule

The implementation of the interface events.AbstractCalendarSynchronizationModule for the ICalendar file backend

Instance Methods [hide private]
 
__init__(self, modulesString, config, configsection, folder, verbose=False, soft=False)
Constructor
source code
 
_guessAmount(self)
Try to determine roughly how many entries are in this file (we can't know prior to parsing; but we have a guess using the file size)
source code
 
load(self)
Load all data from local ICS file
source code
 
saveModifications(self)
Save whatever changes have come by
source code

Inherited from events.events.AbstractCalendarSynchronizationModule: addEvent, allEvents, getEvent, removeEvent, replaceEvent

Inherited from pisiinterfaces.AbstractSynchronizationModule: addEntry, allEntries, flush, getDescription, getEntry, getName, postProcess, preProcess, prettyPrint, removeEntry, replaceEntry

Instance Variables [hide private]
Method Details [hide private]

__init__(self, modulesString, config, configsection, folder, verbose=False, soft=False)
(Constructor)

source code 

Constructor

Super class constructor (events.AbstractCalendarSynchronizationModule.__init__) is called. Local variables are initialized. The settings from the configuration file are loaded.

Overrides: pisiinterfaces.AbstractSynchronizationModule.__init__

load(self)

source code 

Load all data from local ICS file

File is opened and the entries are parsed. For each entry an events.events.Event instance is created and stored in the instance dictionary.

saveModifications(self)

source code 

Save whatever changes have come by

Iterates the history of actions and replaces the corresponding items with new vobject instances. In the end, the vobject representation is written to the ICS file.