changed place where metadata is extracted
This commit is contained in:
parent
6cfef54e23
commit
31494b80c3
2 changed files with 10 additions and 20 deletions
|
|
@ -54,15 +54,13 @@ IF %file%==none (goto :errorfile) ELSE (goto :extract_metadata)
|
|||
:extract_metadata
|
||||
set title=%file%
|
||||
For /F "UseBackQ Tokens=1,*" %%G In ("%file%.md") Do (
|
||||
If "%%~G" == "[Title]:" (
|
||||
If "%%~G" == "title:" (
|
||||
set title=%%H
|
||||
)
|
||||
If "%%~G" == "[Author]:" (
|
||||
If "%%~G" == "author:" (
|
||||
set editor=%%H
|
||||
)
|
||||
)
|
||||
set title=%title:~3,-1%
|
||||
set editor=%editor:~3,-1%
|
||||
goto :selection
|
||||
|
||||
:selection
|
||||
|
|
@ -109,12 +107,8 @@ echo -f, --file specify filename without extension
|
|||
echo -e, --ending spefify target file format
|
||||
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 Author is by default %USERNAME%
|
||||
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 %USERNAME% 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
|
||||
goto :end
|
||||
|
||||
:version
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue