From c68e80e8b39e46c32b3f7a8f980ab055235d38e3 Mon Sep 17 00:00:00 2001 From: Reinout van Rees Date: Fri, 17 Jan 2025 13:39:01 +0100 Subject: [PATCH] Added md-to-html --- shell/README.rst | 16 ++++++++++++++++ shell/md-to-html | 8 ++++++++ 2 files changed, 24 insertions(+) create mode 100755 shell/md-to-html diff --git a/shell/README.rst b/shell/README.rst index 3778411..3a0108f 100644 --- a/shell/README.rst +++ b/shell/README.rst @@ -281,6 +281,22 @@ Source code:: pandoc -f gfm -t docx $1 -o ${1%.md}.docx +md-to-html +------------------------------------------------------------------------ + +Use pandoc to convert a .md file to docx. + +I originally used the `markdown` format, but I've switched to `gfm`, github +flavoured markdown, because that auto-renders URLS. + +Source code:: + + #!/bin/bash + set -e + set -u + pandoc -f gfm -t html5 $1 -o ${1%.md}.html + + md-to-pdf ------------------------------------------------------------------------ diff --git a/shell/md-to-html b/shell/md-to-html new file mode 100755 index 0000000..11d4560 --- /dev/null +++ b/shell/md-to-html @@ -0,0 +1,8 @@ +#!/bin/bash +# Use pandoc to convert a .md file to docx. +# +# I originally used the `markdown` format, but I've switched to `gfm`, github +# flavoured markdown, because that auto-renders URLS. +set -e +set -u +pandoc -f gfm -t html5 $1 -o ${1%.md}.html