summaryrefslogtreecommitdiff
path: root/md.sh
blob: 09dcdb3a462352c08c41d880769f5cfb4e580e57 (plain)
1
2
3
4
5
6
7
8
9
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)"