Erste Funktion
This commit is contained in:
parent
ecfb6f48e8
commit
94b15ff4f6
1 changed files with 14 additions and 7 deletions
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue