Module vobjecttools
[hide private]
[frames] | no frames]

Module vobjecttools

source code

Additional layer to vobject site-package

Functions [hide private]
 
_extractAtt(x, st)
Supporting function for pulling information out of a attribute
source code
 
extractVcfEntry(x, defaultPhonetype=None)
Walks an entire vobject vcard entity and stores all information in a dictionary, which is returned in the end
source code
 
_createRawAttribute(c, j, att, value, params=[])
Supporting function for adding a single attribute to vcard raw object
source code
 
_createNameAttribute(c, j) source code
 
_createPhoneAttribute(c, j, type)
Create and append phone entry
source code
 
_attFromDict(dict, att) source code
 
_createAddressAttribute(c, j, type)
Create and append address entry
source code
 
_createBusinessDetails(c, j)
Creates an entry for business organzation und unit.
source code
 
createRawVcard(c)
Converts internal contact entry to VObject format
source code
 
checkForMandatoryFields(entries)
Checks each entry, whether all mandatory fields are available.
source code
 
_extractRecurrence(x, allDay)
Transforms VObject recurrence information into PISI internal object events.Recurrence
source code
 
extractICSEntry(x) source code
 
_createRecurrencePart(c, cal)
Transforms PISI internal recurrence information (events.Recurrence) into vobject representation
source code
 
_createAlarmPart(c, cal)
Transforms PISI internal alarm information (1 single integer for minutes) into vobject representation
source code
 
createRawEventEntry(c, stupidMode=False)
Transforms PISI internal Calendar event information (events.Event) into vobject representation
source code
Variables [hide private]
  VCF_PHONETYPE_HOME = [['HOME', 'VOICE'], ['VOICE', 'HOME'], ['...
Indentifies a phone entry as work phone
  VCF_PHONETYPE_WORK = [['WORK', 'VOICE'], ['VOICE', 'WORK'], ['...
Indentifies a phone entry as mobile phone
  VCF_PHONETYPE_MOBILE = [['CELL', 'VOICE'], ['VOICE', 'CELL'], ...
Indentifies a phone entry as fax
  VCF_PHONETYPE_FAX = [['FAX']]
Entries to remove before comparing
  VCF_PHONETYPE_IGNORELIST = ['OTHER']
Indentifies an address entry as home address
  VCF_ADDRESSTYPE_HOME = [['HOME', 'POSTAL'], ['POSTAL', 'HOME']...
Indentifies an address entry as work address
  VCF_ADDRESSTYPE_WORK = [['WORK', 'POSTAL'], ['POSTAL', 'WORK']...
  ACTIONID_ADD = 0
  ACTIONID_DELETE = 1
  ACTIONID_MODIFY = 2
  CONSOLE_PROGRESSBAR_WIDTH = 80
  FILEDOWNLOAD_TIMEOUT = 10
  FILEDOWNLOAD_TMPFILE = '/tmp/pisi-remotebuffer.data'
  FILEPATH_COPYING = '/opt/pisi/COPYING'
  GOOGLE_CALENDAR_APPNAME = 'pisi0.5'
  GOOGLE_CALENDAR_MAXRESULTS = 1000
  GOOGLE_CONTACTS_APPNAME = 'pisi0.5'
  GOOGLE_CONTACTS_MAXRESULTS = 1000
  ICS_BYTES_PER_ENTRY = 200
  MERGEMODE_FLUSH_A = 1
  MERGEMODE_FLUSH_B = 2
  MERGEMODE_MANUALCONFIRM = 5
  MERGEMODE_OVERWRITE_A = 3
  MERGEMODE_OVERWRITE_B = 4
  MERGEMODE_SKIP = 0
  MERGEMODE_STRINGS = ['Skip', 'Flush source 1', 'Flush source 2...
  MODE_CALENDAR = 0
  MODE_CONTACTS = 1
  MODE_STRINGS = ['calendar', 'contacts']
  PISI_AUTHORS = ['Esben Damgaard', 'Michael Pilgermann']
  PISI_COMMENTS = 'PISI is synchronizing information'
  PISI_DOCUMENTERS = ['Michael Pilgermann']
  PISI_HOMEPAGE = 'http://freshmeat.net/projects/pisiom'
  PISI_NAME = 'PISI'
  PISI_TRANSLATOR_CREDITS = None
  PISI_VERSION = '0.5'
  VCF_BYTES_PER_ENTRY = 200
  __package__ = None
Function Details [hide private]

_extractAtt(x, st)

source code 

Supporting function for pulling information out of a attribute

Gets around problems with non available attributes without the need for checking this beforehand for each attribute.

extractVcfEntry(x, defaultPhonetype=None)

source code 

Walks an entire vobject vcard entity and stores all information in a dictionary, which is returned in the end

For mapping the PISI rules are applied.

_createPhoneAttribute(c, j, type)

source code 

Create and append phone entry

Phone entries are a bit tricky - you cannot access each of them directly as they all have the same attribute key (tel). Consequently, we have to access the dictionary for phones directly.

_createAddressAttribute(c, j, type)

source code 

Create and append address entry

Entry is only created if city is set.

checkForMandatoryFields(entries)

source code 

Checks each entry, whether all mandatory fields are available.

Current implementation only chechs for Full Name - if not available it will try to assemble something from first and last name.


Variables Details [hide private]

VCF_PHONETYPE_HOME

Indentifies a phone entry as work phone

Value:
[['HOME', 'VOICE'], ['VOICE', 'HOME'], ['HOME']]

VCF_PHONETYPE_WORK

Indentifies a phone entry as mobile phone

Value:
[['WORK', 'VOICE'], ['VOICE', 'WORK'], ['WORK']]

VCF_PHONETYPE_MOBILE

Indentifies a phone entry as fax

Value:
[['CELL', 'VOICE'], ['VOICE', 'CELL'], ['CELL'], ['VOICE']]

VCF_ADDRESSTYPE_HOME

Indentifies an address entry as work address

Value:
[['HOME', 'POSTAL'], ['POSTAL', 'HOME'], ['HOME']]

VCF_ADDRESSTYPE_WORK

Value:
[['WORK', 'POSTAL'], ['POSTAL', 'WORK'], ['WORK']]

MERGEMODE_STRINGS

Value:
['Skip',
 'Flush source 1',
 'Flush source 2',
 'Overwrite entry in source 1',
 'Overwrite entry in source 2',
 'Manual confirmation']