all repos — mycal @ abb5abb3063b445182a582e85ff313c931046c74

private calendar anonymiser

refactor to ease multi-calendar implementation

Alan Pearce
commit

abb5abb3063b445182a582e85ff313c931046c74

parent

b3b1274d838f28945d87a4d1bab29a880e785033

1 file changed, 2 insertions(+), 3 deletions(-)

changed files
M mycal.pymycal.py
@@ -35,8 +35,7 @@ def read_calendar_file(calendar_file):
with open(calendar_file, 'rb') as f: return f.read() -def get_calendar(): - calendar_config = config.calendar +def get_calendar(calendar_config): if calendar_config.file != "": return read_calendar_file(calendar_config.file) else:
@@ -65,7 +64,7 @@ output.add('version', '2.0')
# Parse with icalendar try: - input = Calendar.from_ical(get_calendar()) + input = Calendar.from_ical(get_calendar(config.calendar)) for component in input.walk(): if component.name == "VEVENT": dtstart = fixup_date(component.get('dtstart').dt)