summaryrefslogblamecommitdiffstatshomepage
path: root/util/mdconv.sh
blob: 19f4d4c33a508b3a86a447d0cc3c41b38ce3f6e1 (plain) (tree)



















                                                                                
set -e

title="$(lowdown -X title "$1")"
date="$(lowdown -X date "$1")"
author="$(lowdown -X author "$1")"

cat<<EOF
<?xml version="1.0" encoding="UTF-8" ?>
<article data-sblg-article="true">
	<header>
		<h1>$title</h1>
		<address>$author</address>
		<a href="..">↖</a>
		<time datetime="$date">$(date -d"$date" '+%A, %B %e, %Y')</time>
	</header>
	<main>
		$(lowdown "$1")
	</main>
</article>
EOF