1
0
Fork 0
forked from ZeusWPI/drive
drive/scripts/md_to_pdf.sh
2020-10-11 20:32:45 +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