diff options
Diffstat (limited to '')
-rw-r--r-- | util/mdconv.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/util/mdconv.sh b/util/mdconv.sh new file mode 100644 index 0000000..19f4d4c --- /dev/null +++ b/util/mdconv.sh @@ -0,0 +1,20 @@ +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 |