def getDates(self): dates = [] for i in Calendar.from_string(open(self.path).read()).subcomponents: date = str(i['CREATED'].dt).split(' ')[0] if not date in dates: dates.append(date) return dates
def getNoteDate(self, entry): for i in Calendar.from_string(open(self.path).read()).subcomponents: if str(i['SUMMARY']) == entry: date = str(i['CREATED'].dt).split(' ')[0] break return date
def getText(self, entry): for i in Calendar.from_string(open(self.path).read()).subcomponents: if str(i['SUMMARY']) == entry: text = prop.vText.from_ical(i['DESCRIPTION'].ical()).encode('utf8') break return text
def getNotesByDate(self, date): return [str(i['SUMMARY']) for i in Calendar.from_string(open(self.path).read()).subcomponents \ if str(i['CREATED'].dt).split(" ")[0] == date]
def getNotes(self): return [str(i['SUMMARY']) for i in Calendar.from_string(open(self.path).read()).subcomponents]