Created
April 28, 2020 13:33
-
-
Save Kombustor/b30b8ab6ef351672c92c12508b28d012 to your computer and use it in GitHub Desktop.
Markdown Setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"pasteImage.defaultName": "${currentFileNameWithoutExt}_Y-MM-DD-HH-mm-ss", | |
"pasteImage.forceUnixStyleSeparator": false, | |
"pasteImage.path": "${currentFileDir}/attachments/" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
DIR=$1 | |
cd ${DIR:-.} | |
find . -name "*.md" | while read FILE; do | |
FILE_DIR=$(dirname "${FILE}"); | |
PDF_FILE="${FILE%.*}.pdf" | |
if [ "$FILE" -nt "$PDF_FILE" ]; then | |
echo "Processing $FILE"; | |
COMMAND="docker run --rm -v \"$(pwd):/pandoc\" dalibo/pandocker --pdf-engine=xelatex --resource-path \"$FILE_DIR\" -V geometry:margin=1.5cm -V papersize:a4 -V mainfont=\"Lato\" -f markdown -t latex -o \"$PDF_FILE\" \"$FILE\""; | |
bash -c "$COMMAND"; | |
fi | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment