From 0efda7fdf6c36403414bb4df7d8017c5a815f256 Mon Sep 17 00:00:00 2001 From: "m.haas" Date: Tue, 13 Jun 2023 12:29:34 +0200 Subject: [PATCH] variable picturefile --- pandocPipeline/pandocPipeline.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pandocPipeline/pandocPipeline.sh b/pandocPipeline/pandocPipeline.sh index b563f8c..86bd856 100755 --- a/pandocPipeline/pandocPipeline.sh +++ b/pandocPipeline/pandocPipeline.sh @@ -8,6 +8,7 @@ ending=tex toc=false # path to this script script=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) +picture=$script/Logo.png Help() { @@ -18,7 +19,8 @@ echo -f, --file specify filename without extension echo -e, --ending spefify target file format echo -u, --user=$editor enter name of file editor set between "" \(only for target format pdf\) echo -t, --title enter title of document set between "" \(only for target format pdf\) -echo -c --toc prints a table of content at the start of the document +echo -c, --toc prints a table of content at the start of the document +echo -p, --picture changes the default picture to a specified picture relative to current path echo Pipeline is optimized for target format pdf and docx but works with others as well echo Possible fileformats see: https://pandoc.org/diagram.svgz?v=20230203095535 echo Examples: @@ -56,6 +58,9 @@ while [[ $# -gt 0 ]]; do -v|--version) echo pandocPipeline $version exit;; + -p|--picture) + picture="$2" + shift 2;; -c|--toc) toc=true shift;; @@ -73,7 +78,6 @@ if [[ -z "$file" ]]; then elif [[ "$ending" == "pdf" ]]; then header=$script/header.md sedfile=$script/body.sed - picture=$script/Logo.png sed -i 's,Editor:.*,Editor: '"$editor"' \\\\,' $header sed -i 's,Title:.*,Title: '"$title"',' $header sed -i 's,textwidth]{.*,textwidth]{'"$picture"'}},' $header