1
Fork 0

Inject some more variables into metadata

This commit is contained in:
Jake Howard 2018-04-29 20:09:44 +01:00
parent 043c400d5d
commit daadbd5773
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 6 additions and 2 deletions

View file

@ -8,7 +8,7 @@ SCRIPTPATH=`dirname $SCRIPT`
ADDITIONAL_ARGS=${@:2} ADDITIONAL_ARGS=${@:2}
INPUT_FILE=`realpath $1` INPUT_FILE=`realpath $1`
INPUT_DIR=`dirname $INPUT_FILE` export INPUT_DIR=`dirname $INPUT_FILE`
METADATA_FILE="$INPUT_DIR/metadata.yaml" METADATA_FILE="$INPUT_DIR/metadata.yaml"
export OUTPUT_FILE="$PWD/output.pdf" export OUTPUT_FILE="$PWD/output.pdf"

View file

@ -19,7 +19,11 @@ end
return { return {
{ {
Meta = getVars Meta = function (meta)
meta = getVars(meta)
meta['outputFile'] = os.getenv("OUTPUT_FILE")
meta['inputDir'] = os.getenv("INPUT_DIR")
end
}, },
{ {
Str = function (el) Str = function (el)