aboutsummaryrefslogtreecommitdiff
path: root/bin/mdurls
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-06-18 14:03:41 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-06-18 14:03:41 +1200
commitc04d328b1a04cd637762c21c5d6d9425bf1ad46d (patch)
tree735c57c25638270a2bb5aa86dcb9ab59bc3b47eb /bin/mdurls
parentCommenting for urlcheck (diff)
downloaddotfiles-c04d328b1a04cd637762c21c5d6d9425bf1ad46d.tar.gz
dotfiles-c04d328b1a04cd637762c21c5d6d9425bf1ad46d.zip
Nice comments for URLs scripts
Diffstat (limited to 'bin/mdurls')
-rwxr-xr-xbin/mdurls16
1 files changed, 15 insertions, 1 deletions
diff --git a/bin/mdurls b/bin/mdurls
index f4cd281a..e15864aa 100755
--- a/bin/mdurls
+++ b/bin/mdurls
@@ -1,4 +1,18 @@
#!/usr/bin/env bash
+
+#
+# Format markdown and pass it to htmlurls 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 markdown htmlurls || exit
-markdown "${@:-/dev/stdin}" |
+
+# Pipe the output of markdown(1) on our args ...
+markdown -- "${@:-/dev/stdin}" |
+
+# ... into our own htmlurls
htmlurls