diff --git a/prosopopee/prosopopee.py b/prosopopee/prosopopee.py index 312f39c..8c079c0 100644 --- a/prosopopee/prosopopee.py +++ b/prosopopee/prosopopee.py @@ -116,7 +116,7 @@ def main(): os.makedirs("build") theme = settings.get("settings", {}).get("theme", "exposure") - + error(os.path.exists(os.path.join(os.path.split(os.path.realpath(__file__))[0], "themes", theme)), "'%s' is not an existing theme, available themes are '%s'" % (theme, "', '".join(os.listdir(os.path.join(os.path.split(os.path.realpath(__file__))[0], "themes"))))) templates = Environment(loader=FileSystemLoader([os.path.realpath(os.path.join(os.getcwd(), "templates")), os.path.join(os.path.split(os.path.realpath(__file__))[0], "themes", theme, "templates")])) @@ -164,7 +164,7 @@ def main(): template_to_render = page_template if gallery_settings.get("static") else gallery_index_template open(os.path.join("build", gallery, "index.html"), "w").write(template_to_render.render(settings=settings, gallery=gallery_settings, Image=Image, link=gallery).encode("Utf-8")) - + if settings.get("rss"): open(os.path.join("build", "feed.xml"), "w").write(feed_template.render(settings=settings, link=gallery, galleries=reversed(sorted(front_page_galleries_cover, key=lambda x: x["date"]))).encode("Utf-8"))