#!/usr/bin/env sh # wrapper for chromium that converts html fragments to data URIs # so they can be "piped" into chromium via stdin, like a here document # useful for previewing markdown as a rendered html document # usage: markdown document.md | to-chromium { echo ''; cat; } \ | chromium "data:text/html;base64,$(base64 -w 0)" -incognito