From 1d7f3ff90133b579a1859378bc4014780b7a3383 Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Tue, 1 Dec 2020 16:36:04 +0100 Subject: [PATCH] FIX: Path when outputing in a different directory. --- mdtoreveal.py | 5 +++-- setup.cfg | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mdtoreveal.py b/mdtoreveal.py index 38b25b6..0fe0932 100644 --- a/mdtoreveal.py +++ b/mdtoreveal.py @@ -254,7 +254,8 @@ def main(): tpl = jinja2.Template(TPL) root = Path(args.html).resolve().parent - reveal_path = root / f"reveal.js-{REVEAL_JS_VERSION}" + reveal_dir = f"reveal.js-{REVEAL_JS_VERSION}" + reveal_path = root / reveal_dir if not reveal_path.exists(): tarball = io.BytesIO(requests.get(REVEAL_ARCHIVE).content) tarfile.open(fileobj=tarball, mode="r:gz").extractall(root) @@ -274,7 +275,7 @@ def main(): sections.append(slides) with open(args.html, "w") as f: - f.write(tpl.render(slides=sections, revealjs_url=reveal_path)) + f.write(tpl.render(slides=sections, revealjs_url=reveal_dir)) if __name__ == "__main__": diff --git a/setup.cfg b/setup.cfg index 68b791f..861106f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = mdtoreveal -version = 0.2 +version = 0.3 description = Transform a flat markdown to a reveal.js presentation. long_description = file: README.md long_description_content_type = text/markdown; charset=UTF-8