From 8bf0d101db8660fdfd9ede7ce95309e4569c9d38 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 28 Nov 2019 14:12:31 +0100 Subject: [PATCH] add tex to pdf convert --- Dockerfile | 2 +- run.sh | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index dd54baf..444dbb3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM python:3.5-alpine -RUN apk add --no-cache nmap nmap-scripts git +RUN apk add --no-cache nmap nmap-scripts git texlive-full RUN pip install --no-cache-dir xmltodict google-cloud-storage boto3 diff --git a/run.sh b/run.sh index 77ec6d0..c81a221 100755 --- a/run.sh +++ b/run.sh @@ -12,6 +12,7 @@ fi xml_dir=xml_files/$current_time report_file=reports/report_$current_time.tex +report_file_pdf=reports/report_$current_time.pdf function upload { if [[ -z $upload ]] @@ -44,4 +45,11 @@ sed -i 's/_/\\_/g' $root_dir$report_file sed -i 's/\$/\\\$/g' $root_dir$report_file sed -i 's/#/\\#/g' $root_dir$report_file sed -i 's/%/\\%/g' $root_dir$report_file +latexmk -pdf -outdir=$root_dir/reports $root_dir$report_file #make pdf +popdir=`pwd` #pushd +cd $root_dir/reports +latexmk -c -f $root_dir$report_file #cleanup tex aux files +cd $popdir #popd upload $report_file +upload $report_file_pdf +