variable picturefile
This commit is contained in:
parent
b3570862ec
commit
0efda7fdf6
1 changed files with 6 additions and 2 deletions
|
|
@ -8,6 +8,7 @@ ending=tex
|
||||||
toc=false
|
toc=false
|
||||||
# path to this script
|
# path to this script
|
||||||
script=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
|
script=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
|
||||||
|
picture=$script/Logo.png
|
||||||
|
|
||||||
|
|
||||||
Help() {
|
Help() {
|
||||||
|
|
@ -18,7 +19,8 @@ echo -f, --file specify filename without extension
|
||||||
echo -e, --ending spefify target file format
|
echo -e, --ending spefify target file format
|
||||||
echo -u, --user=$editor enter name of file editor set between "" \(only for target format pdf\)
|
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 -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 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 Possible fileformats see: https://pandoc.org/diagram.svgz?v=20230203095535
|
||||||
echo Examples:
|
echo Examples:
|
||||||
|
|
@ -56,6 +58,9 @@ while [[ $# -gt 0 ]]; do
|
||||||
-v|--version)
|
-v|--version)
|
||||||
echo pandocPipeline $version
|
echo pandocPipeline $version
|
||||||
exit;;
|
exit;;
|
||||||
|
-p|--picture)
|
||||||
|
picture="$2"
|
||||||
|
shift 2;;
|
||||||
-c|--toc)
|
-c|--toc)
|
||||||
toc=true
|
toc=true
|
||||||
shift;;
|
shift;;
|
||||||
|
|
@ -73,7 +78,6 @@ if [[ -z "$file" ]]; then
|
||||||
elif [[ "$ending" == "pdf" ]]; then
|
elif [[ "$ending" == "pdf" ]]; then
|
||||||
header=$script/header.md
|
header=$script/header.md
|
||||||
sedfile=$script/body.sed
|
sedfile=$script/body.sed
|
||||||
picture=$script/Logo.png
|
|
||||||
sed -i 's,Editor:.*,Editor: '"$editor"' \\\\,' $header
|
sed -i 's,Editor:.*,Editor: '"$editor"' \\\\,' $header
|
||||||
sed -i 's,Title:.*,Title: '"$title"',' $header
|
sed -i 's,Title:.*,Title: '"$title"',' $header
|
||||||
sed -i 's,textwidth]{.*,textwidth]{'"$picture"'}},' $header
|
sed -i 's,textwidth]{.*,textwidth]{'"$picture"'}},' $header
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue