#NEWLINE# def convert_meetings_to_ical( meetings , outputdir = None , outputfile = None , calname = None , caldescription = None ) : #NEWLINE# #INDENT# 'Converts a meeting list to iCal.\n\n    :param meetings: list of meetings to convert\n    :param outputdir: location to store iCal files (one file per meeting)\n    :param outputfile: output iCal file (one single file for all meetings)\n\n    ' #NEWLINE# if outputdir : #NEWLINE# #INDENT# for m in meetings : #NEWLINE# #INDENT# cal = Yaml2IcalCalendar ( ) #NEWLINE# cal . add_meeting ( m ) #NEWLINE# cal . write_to_disk ( os . path . join ( outputdir , m . outfile ) ) #NEWLINE# #UNINDENT# #UNINDENT# if outputfile : #NEWLINE# #INDENT# cal = Yaml2IcalCalendar ( calname , caldescription ) #NEWLINE# for m in meetings : #NEWLINE# #INDENT# cal . add_meeting ( m ) #NEWLINE# #UNINDENT# cal . write_to_disk ( outputfile ) #NEWLINE# #UNINDENT# logging . info ( ( 'Wrote %d meetings to iCal' % len ( meetings ) ) )