diff options
Diffstat (limited to 'panfry/main.py')
| -rwxr-xr-x | panfry/main.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/panfry/main.py b/panfry/main.py index 917ebc0..5d05d20 100755 --- a/panfry/main.py +++ b/panfry/main.py @@ -70,15 +70,16 @@ def get_env(): def gen(env): for item in env.index: item = item.strip() + print("Processing: %s..." % item) docpubpath = os.path.join(env.pub_path, item) document = Document(env.doc_path, item) - document.set_templater(Templater(env.templates_path)) - document.set_pandoc_options(env.pandoc_options) + document.templater = Templater(env.templates_path) + document.pandoc_options = env.pandoc_options if env.simple_toc: - document.set_simple_toc + document.toc_type = 'simple' if env.json_toc: - document.set_json_toc + document.toc_type = 'json' if env.clean and os.path.exists(env.pub_path): print("Cleanup, removing %s..." % env.pub_path) @@ -100,11 +101,13 @@ def gen(env): ###### Create PDF pdffile = document.publish_pdf(docpubpath) - print("Wrote PDF: %s" % pdffile) + if pdffile: + print("Wrote PDF: %s" % pdffile) ###### Create epub epubfile = document.publish_epub(docpubpath) - print("Wrote epub: %s" % epubfile) + if epubfile: + print("Wrote epub: %s" % epubfile) ###### Create HTML document.publish_html(docpubpath) |
