From f09c961399356cde239fe06c4fd0e5030e8523e1 Mon Sep 17 00:00:00 2001 From: Olivier Keshavjee Date: Sat, 21 Oct 2017 01:01:26 +0200 Subject: [PATCH] Adds: Passes title, subtitle and author to pandoc for document export --- manuskript/exporter/pandoc/__init__.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/manuskript/exporter/pandoc/__init__.py b/manuskript/exporter/pandoc/__init__.py index d2380a40..d36e78d8 100644 --- a/manuskript/exporter/pandoc/__init__.py +++ b/manuskript/exporter/pandoc/__init__.py @@ -51,6 +51,20 @@ class pandocExporter(basicExporter): if outputfile: args.append("--output={}".format(outputfile)) + for name, col, var in [ + ("Title", 0, "title"), + ("Subtitle", 1, "subtitle"), + ("Serie", 2, ""), + ("Volume", 3, ""), + ("Genre", 4, ""), + ("License", 5, ""), + ("Author", 6, "author"), + ("Email", 7, ""), + ]: + item = mainWindow().mdlFlatData.item(0, col) + if var and item and item.text().strip(): + args.append("--variable={}:{}".format(var, item.text().strip())) + qApp.setOverrideCursor(QCursor(Qt.WaitCursor)) p = subprocess.Popen(