#NEWLINE# def __init__( self , ofattribs ) : #NEWLINE# #INDENT# Task . __init__ ( self , name = ofattribs [ 'name' ] , date_completed = datetimeFromAttrib ( ofattribs , 'dateCompleted' ) , date_to_start = datetimeFromAttrib ( ofattribs , 'dateToStart' ) , date_due = datetimeFromAttrib ( ofattribs , 'dateDue' ) , date_added = datetimeFromAttrib ( ofattribs , 'dateAdded' ) , estimated_minutes = intFromAttrib ( ofattribs , 'estimatedMinutes' ) , flagged = bool ( ofattribs [ 'flagged' ] ) , context = None ) #NEWLINE# self . ofattribs = ofattribs #NEWLINE# self . order = ofattribs [ 'rank' ] #NEWLINE# if ( 'persistentIdentifier' in ofattribs ) : #NEWLINE# #INDENT# self . id = ofattribs [ 'persistentIdentifier' ] #NEWLINE# self . link = ( 'omnifocus:///task/' + ofattribs [ 'persistentIdentifier' ] ) #NEWLINE# #UNINDENT# noteXMLData = ofattribs [ 'noteXMLData' ] #NEWLINE# if ( noteXMLData != None ) : #NEWLINE# #INDENT# self . note = OFNote ( self , noteXMLData ) #NEWLINE# #UNINDENT# logger . debug ( 'loaded task: %s %s' , self . id , self . name )