5
0
Fork 0

Erste Funktion

This commit is contained in:
m.haas 2023-06-07 10:35:39 +02:00
parent ecfb6f48e8
commit 94b15ff4f6

View file

@ -3,7 +3,7 @@
version=1.0
editor=$USER
title=''
file=none
file=
ending=tex
# path to this script
script=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
@ -64,13 +64,20 @@ while true; do
esac
done
echo $script
scriptpath=$script
echo $scriptpath
scriptpath+=/header.txt
echo $scriptpath
if [[ -z "$file" ]]; then
Errorfile
exit
fi
if [[ "$ending" == "pdf" ]]
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
cat %file%.md $header | sed -E -f $sedfile| pandoc --filter $pandocenv --number-sections --toc -i - -o $file.pdf
xdg-open $file.pdf
fi