diff options
author | Wolfgang Müller | 2019-07-21 21:09:36 +0200 |
---|---|---|
committer | Wolfgang Müller | 2019-07-21 21:09:36 +0200 |
commit | 4fe23d93c4f39b08f5bc4320af37ba109e618295 (patch) | |
tree | 5fd739e5189f68bb6ea9f5edc60aa68325adfe44 /util | |
download | site-4fe23d93c4f39b08f5bc4320af37ba109e618295.tar.gz |
Initial import
Diffstat (limited to 'util')
-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 |