drive/docs/scripts/md_to_pdf.sh
2021-08-19 17:14:10 +02:00

13 lines
329 B
Bash
Executable file

#!/bin/sh
echo "Converting to PDF…"
for file in *.md */*.md
do
echo " converting $file"
output_path=$(echo "$file" | sed '$s/\.md$/.pdf/')
echo " $output_path"
output_name=$(echo "$file" | sed '$s/\.md$/.pdf/')
echo " $output_name"
pandoc "$file" -f markdown -t pdf -o "$output_path" -s --data-dir=./
done