aboutsummaryrefslogtreecommitdiff
path: root/bin/murl
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-06-22 10:13:10 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-06-22 10:13:10 +1200
commitc83042d6701f275bd792fb15c889e780deddb14a (patch)
treecc6f6615267ce1ce8aae52e59477d8cea4dd8e73 /bin/murl
parentRemove reference to GitHub dotfiles pages (diff)
downloaddotfiles-c83042d6701f275bd792fb15c889e780deddb14a.tar.gz
dotfiles-c83042d6701f275bd792fb15c889e780deddb14a.zip
Rename binscripts more tersely
Diffstat (limited to 'bin/murl')
-rwxr-xr-xbin/murl18
1 files changed, 18 insertions, 0 deletions
diff --git a/bin/murl b/bin/murl
new file mode 100755
index 00000000..7b5dc050
--- /dev/null
+++ b/bin/murl
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+
+#
+# Format markdown and pass it to hurl to extract URLs from it.
+#
+# Author: Tom Ryder <tom@sanctum.geek.nz>
+# Copyright: 2016
+# License: Public domain
+#
+
+# Check we have the programs we need
+hash pandoc hurl || exit
+
+# Pipe the output of pandoc(1) on our args ...
+pandoc -f markdown -t html -- "${@:-/dev/stdin}" |
+
+# ... into our own hurl
+hurl