From 09f0bcd2b20ffa5eb59a54ebfd89f1ee32a4b42a Mon Sep 17 00:00:00 2001 From: Castro0o Date: Sun, 18 Feb 2018 13:38:58 +0100 Subject: [PATCH] icml with solo flag --- cgi-bin/pandoc.cgi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cgi-bin/pandoc.cgi b/cgi-bin/pandoc.cgi index 2ce7522..d9eeb45 100755 --- a/cgi-bin/pandoc.cgi +++ b/cgi-bin/pandoc.cgi @@ -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)