|
|
|
@ -113,8 +113,12 @@ if method == "POST":
|
|
|
|
|
print
|
|
|
|
|
|
|
|
|
|
#p = subprocess.check_output('echo "{2}"|pandoc --from {0} --to {1} '.format(from_format, to_format, '#foo'), shell=True, stderr=subprocess.STDOUT)
|
|
|
|
|
#print p
|
|
|
|
|
cmd = "{} --from {} --to {}".format(PANDOC, from_format, to_format)
|
|
|
|
|
#print 'to_format', to_format
|
|
|
|
|
if to_format == 'icml': # icml needs solo flag: -s
|
|
|
|
|
cmd = "{} --from {} --to {} -s".format(PANDOC, from_format, to_format)
|
|
|
|
|
else:
|
|
|
|
|
cmd = "{} --from {} --to {}".format(PANDOC, from_format, to_format)
|
|
|
|
|
|
|
|
|
|
cmd_list = shlex.split( cmd )
|
|
|
|
|
|
|
|
|
|
p = subprocess.Popen(cmd_list, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
|
|
|
|