X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=nhentai%2Futils.py;fp=nhentai%2Futils.py;h=b3358e461fcc774224f0fa1844448204999cef1b;hb=445a8c052ef6a995a67e71e6067ffc9a79a1514e;hp=fb7355909fa07d32e750074c2aa34b2d05fd1c7b;hpb=7f48b3edd15f13b168257e594650563826741185;p=nhentai.git diff --git a/nhentai/utils.py b/nhentai/utils.py index fb73559..b3358e4 100644 --- a/nhentai/utils.py +++ b/nhentai/utils.py @@ -64,7 +64,7 @@ def readfile(path): return file.read() -def generate_html(output_dir='.', doujinshi_obj=None): +def generate_html(output_dir='.', doujinshi_obj=None, template='default'): image_html = '' if doujinshi_obj is not None: @@ -81,9 +81,9 @@ def generate_html(output_dir='.', doujinshi_obj=None): image_html += '\n'\ .format(image) - html = readfile('viewer/index.html') - css = readfile('viewer/styles.css') - js = readfile('viewer/scripts.js') + html = readfile('viewer/{}/index.html'.format(template)) + css = readfile('viewer/{}/styles.css'.format(template)) + js = readfile('viewer/{}/scripts.js'.format(template)) if doujinshi_obj is not None: serialize_json(doujinshi_obj, doujinshi_dir)