25 lines
841 B
Fish
Executable File
25 lines
841 B
Fish
Executable File
#!/usr/bin/fish
|
|
|
|
echo 'Generating schema PNG...'
|
|
dia -e schema.png source/schema.dia
|
|
convert schema.png -bordercolor white -border 20 schema.png
|
|
|
|
echo 'Generating HTML...'
|
|
for md_path in source/*.md
|
|
set output_path (echo $md_path | sed 's_source/__;s/md/html/')
|
|
rm -f $output_path
|
|
|
|
set page_html (markdown -f +idanchor -squash -html5 -toc $md_path)
|
|
|
|
echo '<!doctype html>' >> $output_path
|
|
echo '<html lang="en">' >> $output_path
|
|
echo '<head>' >> $output_path
|
|
echo '<meta charset="utf-8">' >> $output_path
|
|
echo '<style>' (curl -s 'https://raw.githubusercontent.com/oxalorg/sakura/master/css/sakura.css') '</style>' >> $output_path
|
|
echo '</head>' >> $output_path
|
|
echo '<body>' >> $output_path
|
|
echo $page_html >> $output_path
|
|
echo '</body>' >> $output_path
|
|
echo '</html>' >> $output_path
|
|
end
|