Back to index

plone3  3.1.7
Classes | Functions | Variables
ATContentTypes.lib.calendarsupport Namespace Reference

Classes

class  CalendarSupportMixin

Functions

def vformat
def n2rn
def rfc2445dt
def foldLine

Variables

string __author__ = 'Christian Heimes <tiran@cheimes.de>'
string __docformat__ = 'restructuredtext'
string PRODID = "-//AT Content Types//AT Event//EN"
string ICS_HEADER
string ICS_FOOTER
string ICS_EVENT_START
string ICS_EVENT_END
string VCS_HEADER
string VCS_FOOTER
string VCS_EVENT_START
string VCS_EVENT_END

Function Documentation

Definition at line 261 of file calendarsupport.py.

00261 
00262 def foldLine(s):
00263     # returns string folded per RFC2445 (each line must be less than 75 octets)
00264     # This code is a minor modification of MakeICS.py, available at:
00265     # http://www.zope.org/Members/Feneric/MakeICS/
00266     
00267     lineLen = 70
00268     
00269     workStr = s.strip().replace('\r\n','\n').replace('\r','\n').replace('\n','\\n')
00270     numLinesToBeProcessed = len(workStr)/lineLen
00271     startingChar = 0
00272     res = ''
00273     while numLinesToBeProcessed >= 1:
00274         res = '%s%s\n '%(res, workStr[startingChar:startingChar+lineLen])
00275         startingChar += lineLen
00276         numLinesToBeProcessed -= 1
00277     return '%s%s\n' % (res, workStr[startingChar:])
00278 

Here is the caller graph for this function:

Definition at line 254 of file calendarsupport.py.

00254 
00255 def n2rn(s):
00256     return s.replace('\n', '\r\n')

Here is the caller graph for this function:

Definition at line 257 of file calendarsupport.py.

00257 
00258 def rfc2445dt(dt):
00259     # return UTC in RFC2445 format YYYYMMDDTHHMMSSZ
00260     return dt.HTML4().replace('-','').replace(':','')

Here is the caller graph for this function:

Definition at line 250 of file calendarsupport.py.

00250 
00251 def vformat(s):
00252     # return string with escaped commas, colons and semicolons
00253     return s.strip().replace(',','\,').replace(':','\:').replace(';','\;')

Here is the caller graph for this function:


Variable Documentation

string ATContentTypes.lib.calendarsupport.__author__ = 'Christian Heimes <tiran@cheimes.de>'

Definition at line 22 of file calendarsupport.py.

Definition at line 23 of file calendarsupport.py.

Initial value:
00001 """\
00002 CLASS:PUBLIC
00003 END:VEVENT
00004 """

Definition at line 71 of file calendarsupport.py.

Initial value:
00001 """\
00002 BEGIN:VEVENT
00003 DTSTAMP:%(dtstamp)s
00004 CREATED:%(created)s
00005 UID:ATEvent-%(uid)s
00006 LAST-MODIFIED:%(modified)s
00007 SUMMARY:%(summary)s
00008 DTSTART:%(startdate)s
00009 DTEND:%(enddate)s
00010 """

Definition at line 53 of file calendarsupport.py.

Initial value:
00001 """\
00002 END:VCALENDAR
00003 """

Definition at line 45 of file calendarsupport.py.

Initial value:
00001 """\
00002 BEGIN:VCALENDAR
00003 PRODID:%(prodid)s
00004 VERSION:2.0
00005 METHOD:PUBLISH
00006 """

Definition at line 38 of file calendarsupport.py.

string ATContentTypes.lib.calendarsupport.PRODID = "-//AT Content Types//AT Event//EN"

Definition at line 35 of file calendarsupport.py.

Initial value:
00001 """\
00002 PRIORITY:3
00003 TRANSP:0
00004 END:VEVENT
00005 """

Definition at line 99 of file calendarsupport.py.

Initial value:
00001 """\
00002 BEGIN:VEVENT
00003 DTSTART:%(startdate)s
00004 DTEND:%(enddate)s
00005 DCREATED:%(created)s
00006 UID:ATEvent-%(uid)s
00007 SEQUENCE:0
00008 LAST-MODIFIED:%(modified)s
00009 SUMMARY:%(summary)s
00010 """

Definition at line 88 of file calendarsupport.py.

Initial value:
00001 """\
00002 END:VCALENDAR
00003 """

Definition at line 83 of file calendarsupport.py.

Initial value:
00001 """\
00002 BEGIN:VCALENDAR
00003 PRODID:%(prodid)s
00004 VERSION:1.0
00005 """

Definition at line 77 of file calendarsupport.py.