mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-17 11:22:28 +12:00
parent
3dfb43f6c1
commit
f1baab8b3a
|
@ -59,7 +59,7 @@ class basicExporter:
|
|||
run = self.customPath
|
||||
else:
|
||||
print("Error: no command for", self.name)
|
||||
return
|
||||
return None
|
||||
r = subprocess.check_output([run] + args) # timeout=.2
|
||||
return r.decode("utf-8")
|
||||
|
||||
|
|
|
@ -48,7 +48,14 @@ class pandocExporter(basicExporter):
|
|||
return ""
|
||||
|
||||
def convert(self, src, args, outputfile=None):
|
||||
args = [self.cmd] + args
|
||||
if self.isValid() == 2:
|
||||
run = self.cmd
|
||||
elif self.isValid() == 1:
|
||||
run = self.customPath
|
||||
else:
|
||||
print("Error: no command for pandoc")
|
||||
return None
|
||||
args = [run] + args
|
||||
|
||||
if outputfile:
|
||||
args.append("--output={}".format(outputfile))
|
||||
|
|
|
@ -38,6 +38,9 @@ class pandocImporter(abstractImporter):
|
|||
|
||||
r = pandocExporter().run(args)
|
||||
|
||||
if r is None:
|
||||
return None
|
||||
|
||||
if formatTo == "opml":
|
||||
return self.opmlImporter.startImport("", parentItem,
|
||||
settingsWidget, fromString=r)
|
||||
|
|
Loading…
Reference in a new issue