summaryrefslogtreecommitdiff
path: root/md.sh
diff options
context:
space:
mode:
authorSt33v <github@f3rr3t.com>2021-02-17 13:03:04 +1100
committerSt33v <github@f3rr3t.com>2021-02-17 13:03:04 +1100
commit687279c79edda9eefb1c87d67264adcdabda45a9 (patch)
treece15bdbb8b26a5d5dd95a5a0e7b9933e3706319f /md.sh
parent684b4d30fa2aaa95ed4a74d90ed56880d054d328 (diff)
first cut, no error checking
Diffstat (limited to 'md.sh')
-rw-r--r--md.sh10
1 files changed, 10 insertions, 0 deletions
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)"
+