Commit 3a620c67 authored by Stefano Rivera's avatar Stefano Rivera

DebConf13

parent 344f44b5
This diff is collapsed.
......@@ -55,6 +55,14 @@ def index_files(conference):
return index
def dc13_filename(id_):
"""debconf13's filenames are named after the event ID"""
for filename in files_with_prefix(
'2013/debconf13/archival/{}_'.format(id_)):
return Path(filename).stem
return None
def scrape_videos(tree, conference, args):
for day in tree.iter('day'):
date = dateutil.parser.parse(day.attrib['date']).date()
......@@ -67,6 +75,8 @@ def scrape_videos(tree, conference, args):
video = penta_filename(id_)
if conference.series == 'DebConf' and conference.edition == 11:
video = dc11_filename(title)
if conference.series == 'DebConf' and conference.edition == 13:
video = dc13_filename(id_)
if not video:
continue
......@@ -86,9 +96,13 @@ def scrape_videos(tree, conference, args):
'low': 'low/{}.ogv'.format(video),
},
)
if conference.series == 'DebConf' and conference.edition == 13:
event.video = 'archival/{}.ogv'.format(video)
event.alt_formats['high'] = 'high/{}.ogv'.format(video)
if args.ogg:
event.video = 'high/{}.ogg'.format(video)
event.alt_formats['low'] = 'low/{}.ogg'.format(video)
event.video = event.video[:-1] + 'g'
for format_, path in event.alt_formats.items():
event.alt_formats[format_] = path[:-1] + 'g'
if args.mpeg:
event.alt_formats.update({
'mpeg-ntsc': 'ntsc-dvd/{}.mpeg'.format(video),
......@@ -101,6 +115,7 @@ def scrape_videos(tree, conference, args):
'English': 'eng',
'en': 'eng',
'es': 'spa',
'fr': 'fra',
}[penta_lang]
yield event
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment