5
0
Fork 0

changed place where metadata is extracted

This commit is contained in:
m.haas 2023-10-10 16:14:26 +02:00
parent 6cfef54e23
commit 31494b80c3
2 changed files with 10 additions and 20 deletions

View file

@ -24,12 +24,8 @@ echo Possible fileformats see: https://pandoc.org/diagram.svgz?v=20230203095535
echo Examples:
echo md -\> pdf : pandocPipeline -f dateiname -e pdf
echo md -\> docx : pandocPipeline -f dateiname -e docx
echo Author is by default $editor
echo to change the author write follwing in your markdown file
echo \[Author\]: \# \(your name\)
echo Title is by default the filename
echo to change the title write follwing in your markdown file
echo \[Title\]: \# \(document title\)
echo Author is by default $editor to change the author add the author to the metadata in your markdown file
echo Title is by default the filename to change the title add the title to the metadata in your markdown file
}
Errorfile() {
@ -74,10 +70,10 @@ if [[ -z "$file" ]]; then
Errorfile
exit
title=$file
editor=$(grep '\[Author\]: # \(.*\)' $file.md)
editor=${editor:13:-1}
title=$(grep '\[Title\]: # \(.*\)' $file.md)
title=${title:13:-1}
editor=$(grep 'author: .*' $file.md)
editor=${editor:8}
title=$(grep 'title: .*' $file.md)
title=${title:7}
if [[ "$ending" == "pdf" ]]; then
header=$script/header.md
sedfile=$script/body.sed