Fix minor script things.
This commit is contained in:
parent
cba5b8d2ae
commit
96de50de15
|
@ -43,9 +43,8 @@ def thumbnail_url(link):
|
|||
def setup_directory_structure(settings, base_dir, template_dir):
|
||||
site_new_dir = os.path.join(base_dir, 'site-new')
|
||||
os.mkdir(site_new_dir)
|
||||
extern_dir = os.path.join(base_dir, 'extern')
|
||||
extern_dir_site = os.path.join(site_new_dir, 'extern')
|
||||
os.symlink(extern_dir, extern_dir_site)
|
||||
os.symlink(os.path.join('..', 'extern'), extern_dir_site)
|
||||
|
||||
style = read(os.path.join(template_dir, 'style.css'))
|
||||
style_out = style.replace('{', '{{').replace('}', '}}') \
|
||||
|
@ -83,19 +82,20 @@ def generate_video_section_html(section_html, media):
|
|||
def extern_video(file_src):
|
||||
url = '../extern/' + file_src
|
||||
return '''\
|
||||
<video src="{file_src}" controls height="427">
|
||||
<video src="{url}" controls height="427">
|
||||
Your browser cannot play this video. You can download it here instead:
|
||||
<a href="{file_src}">{file_src}</a>
|
||||
<a href="{url}">{url}</a>
|
||||
</video>
|
||||
'''.format(file_src=file_src)
|
||||
'''.format(url=url)
|
||||
|
||||
def youtube_video(file_src):
|
||||
yt_id = file_src
|
||||
return '''\
|
||||
<iframe type="text/html" width="760" height="427"
|
||||
src="https://www.youtube.com/embed/{file_src}?controls=2"
|
||||
src="https://www.youtube.com/embed/{yt_id}?controls=2"
|
||||
allowfullscreen frameborder="0">
|
||||
</iframe>
|
||||
'''.format(file_src=file_src)
|
||||
'''.format(yt_id=yt_id)
|
||||
|
||||
def generate_video_page(base_dir, out_dir, base_html, showing_html, media):
|
||||
title = media['title']
|
||||
|
|
Loading…
Reference in New Issue