Add 'outfile' var that can be used in templates
Add an 'outfile' member variable to the meeting class. This will store the base name of the output filename that would be generated. Change-Id: Id9354b3565c91fd1e143b3826da15ae38aa112aa
This commit is contained in:
parent
2d86450f7e
commit
423a997cc6
|
@ -95,8 +95,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:
|
||||
|
|
|
@ -77,8 +77,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…
Reference in New Issue