funktionsfähig gefixt
This commit is contained in:
parent
94b15ff4f6
commit
0aaf9a43eb
2 changed files with 34 additions and 22 deletions
|
|
@ -14,11 +14,10 @@ header-includes: |
|
|||
\setlength{\textheight}{700pt}
|
||||
\setlength{\footskip}{5pt}
|
||||
\setlength{\headheight}{52pt}
|
||||
\rhead{\includegraphics[width=.3\textwidth]{path/to/Logo.png}}
|
||||
\rhead{\includegraphics[height=.15\textwidth]{/home/haasmi/github/Latex/hedgedoc2pdf/pandocPipeline/Logo.png}}
|
||||
\lhead{
|
||||
Current version date: \today \\
|
||||
Editor:
|
||||
Title:
|
||||
Editor: riam Haas \\
|
||||
Title: Prozokoll656
|
||||
}
|
||||
\cfoot{\thepage}
|
||||
\renewcommand{\footrulewidth}{0.4pt}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
version=1.0
|
||||
editor=$USER
|
||||
title=''
|
||||
title=
|
||||
file=
|
||||
ending=tex
|
||||
# path to this script
|
||||
|
|
@ -35,23 +35,27 @@ echo Please add a filename to your command
|
|||
echo Try 'pandocPipeline --help' for more information
|
||||
}
|
||||
|
||||
ARGS=$(getopt -a --options hvutfe --long "help, version, user, title, file, ending" -- "$@")
|
||||
# ARGS=$(getopt -a --options hvutfe --long "help, version, user, title, file, ending" -- "$@")
|
||||
POSITIONAL_ARGS=()
|
||||
|
||||
eval set -- "$ARGS"
|
||||
#eval set -- "$ARGS"
|
||||
|
||||
while true; do
|
||||
case "$1" in
|
||||
#while true; do
|
||||
while [[ $# -gt 0 ]]; do
|
||||
echo $1
|
||||
echo $2
|
||||
case $1 in
|
||||
-u|--user)
|
||||
editor=$2
|
||||
editor="$2"
|
||||
shift 2;;
|
||||
-t|--title)
|
||||
title=$2
|
||||
title="$2"
|
||||
shift 2;;
|
||||
-f|--file)
|
||||
file=$2
|
||||
file="$2"
|
||||
shift 2;;
|
||||
-e|--ending)
|
||||
ending=$2
|
||||
ending="$2"
|
||||
shift 2;;
|
||||
-v|--version)
|
||||
echo mktex $version
|
||||
|
|
@ -64,20 +68,29 @@ while true; do
|
|||
esac
|
||||
done
|
||||
|
||||
echo Editor $editor
|
||||
echo Title $title
|
||||
|
||||
if [[ -z "$file" ]]; then
|
||||
Errorfile
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ "$ending" == "pdf" ]]
|
||||
echo $ending
|
||||
|
||||
if [[ "$ending" == "pdf" ]]; then
|
||||
header=$script/header.md
|
||||
echo $header
|
||||
sedfile=$script/body.sed
|
||||
echo $sedfile
|
||||
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
|
||||
echo $picture
|
||||
sed -i 's,Editor:.*,Editor: '"$editor"' \\\\,' $header
|
||||
echo 1
|
||||
sed -i 's,Title:.*,Title: '"$title"',' $header
|
||||
echo 2
|
||||
sed -i 's,textwidth]{.*,textwidth]{'"$picture"'}},' $header
|
||||
echo 3
|
||||
cat $file.md $header | sed -E -f $sedfile| pandoc --filter pandoc-latex-environment --number-sections --toc -i - -o $file.pdf
|
||||
xdg-open $file.pdf
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue