2019-02-13 23:50:32 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
|
|
|
|
mkdir -p $script_dir/html
|
|
|
|
|
|
|
|
for markdown_file in $(find $script_dir -name '*.md'); do
|
|
|
|
name=$(basename -s .md $markdown_file)
|
|
|
|
sed -e 's/.md/.html/' $markdown_file | \
|
|
|
|
pandoc -s -f markdown -t html -o $script_dir/html/$name.html
|
|
|
|
done
|
2019-02-12 21:03:04 +08:00
|
|
|
|
|
|
|
for dot_file in $(find $script_dir -name '*.dot'); do
|
|
|
|
name=$(basename -s .dot $dot_file)
|
|
|
|
dot -Tpng $dot_file -o $script_dir/html/$name.png
|
|
|
|
done
|