PoC code in poc directory.

This commit is contained in:
Roberto Abdelkader Martínez Pérez
2019-04-26 07:49:35 +02:00
parent 3017755ea1
commit 969a2522c4
9 changed files with 0 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/zsh
tmpfile=$(mktemp --suffix=.pdf)
pandoc --from=$(request /match/from) --to=pdf --output=${tmpfile} -t latex =(request /body)
if [ $? -eq 0 ]; then
cat ${tmpfile} | response /body
echo "application/pdf" | response /header/Content-Type
echo 200 | response /status
else
echo 500 | response /status
fi
rm -f ${tmpfile}