Individually cached tex and pdf files
This commit is contained in:
parent
e0f58caa71
commit
27f631cc2b
1 changed files with 3 additions and 3 deletions
|
|
@ -19,14 +19,14 @@ when isMainModule:
|
|||
let
|
||||
pad = @"pad"
|
||||
content = getContent(pad, etherpadUrl)
|
||||
texFile = open("etherpad.tex", fmWrite)
|
||||
texFile = open(pad & ".tex", fmWrite)
|
||||
|
||||
texFile.write(content)
|
||||
texFile.close()
|
||||
|
||||
let (output, exitCode) = execCmdEx(quoteShellCommand(["pdflatex", "-halt-on-error", "etherpad.tex"]))
|
||||
let (output, exitCode) = execCmdEx(quoteShellCommand(["pdflatex", "-halt-on-error", pad & ".tex"]))
|
||||
if exitCode == 0:
|
||||
resp(Http200, readFile("etherpad.pdf"), contentType = "application/pdf")
|
||||
resp(Http200, readFile(pad & ".pdf"), contentType = "application/pdf")
|
||||
else:
|
||||
resp output
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue