Merge "Add 'outfile' var that can be used in templates"
This commit is contained in:
commit
616610813d
@ -102,8 +102,7 @@ def convert_meetings_to_ical(meetings, outputdir=None, outputfile=None,
|
||||
for m in meetings:
|
||||
cal = Yaml2IcalCalendar()
|
||||
cal.add_meeting(m)
|
||||
filename = os.path.splitext(m.filefrom)[0] + '.ics'
|
||||
cal.write_to_disk(os.path.join(outputdir, filename))
|
||||
cal.write_to_disk(os.path.join(outputdir, m.outfile))
|
||||
|
||||
# convert meetings into a single ical
|
||||
if outputfile:
|
||||
|
@ -114,8 +114,10 @@ class Meeting(object):
|
||||
|
||||
try:
|
||||
self.filefrom = os.path.basename(data.name)
|
||||
self.outfile = os.path.splitext(self.filefrom)[0] + '.ics'
|
||||
except AttributeError:
|
||||
self.filefrom = "stdin"
|
||||
self.outfile = "stdin.ics"
|
||||
|
||||
self.schedules = []
|
||||
for sch in yaml_obj['schedule']:
|
||||
|
Loading…
x
Reference in New Issue
Block a user