blob: d751040e3f9a2e4ec5a8d2cba29bfb06d1525c36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/bash
for dir in $(ls .md)
do
for file in $(find .md/$dir)
do
if [[ "$file" == *.md ]]
then
newfile=$(sed "s/\.md\///; s/md/html/" <<< $file)
echo "Saved "$file" to "$newfile
pandoc -s --toc --toc-depth=6 \
--ascii -V toc-title:"Contents" \
-f markdown-smart $file -t html -o $newfile
fi
if [[ "$file" == *.description ]]
then
newfile=$(sed "s/\.md\///" <<< $file)
cp -vf $file $newfile
fi
done
done
|