From 687279c79edda9eefb1c87d67264adcdabda45a9 Mon Sep 17 00:00:00 2001 From: St33v Date: Wed, 17 Feb 2021 13:03:04 +1100 Subject: first cut, no error checking --- md.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 md.sh diff --git a/md.sh b/md.sh new file mode 100644 index 0000000..09dcdb3 --- /dev/null +++ b/md.sh @@ -0,0 +1,10 @@ +#! /usr/bin/bash +# Display a markdown file in a browser after converting it to HTML +# SJP 17 Feb 2021 +# +# stolen from https://unix.stackexchange.com/questions/24931/how-to-make-firefox-read-stdin/24942 + +source = $1 + +marked $source | firefox "data:text/html;base64,$(base64 -w 0 <&0)" + -- cgit v1.3