mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-06-17 02:14:33 +12:00
Adds: Passes title, subtitle and author to pandoc for document export
This commit is contained in:
parent
497d1e83a1
commit
f09c961399
|
@ -51,6 +51,20 @@ class pandocExporter(basicExporter):
|
||||||
if outputfile:
|
if outputfile:
|
||||||
args.append("--output={}".format(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))
|
qApp.setOverrideCursor(QCursor(Qt.WaitCursor))
|
||||||
|
|
||||||
p = subprocess.Popen(
|
p = subprocess.Popen(
|
||||||
|
|
Loading…
Reference in a new issue