summary refs log tree commit diff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/mfillmid14
-rwxr-xr-xcontrib/mmairix4
2 files changed, 18 insertions, 0 deletions
diff --git a/contrib/mfillmid b/contrib/mfillmid
new file mode 100755
index 0000000..d69a2e4
--- /dev/null
+++ b/contrib/mfillmid
@@ -0,0 +1,14 @@
+#!/bin/sh
+# mfillmid - fill in files for message-ids (via mairix)
+
+exec awk '
+function q(a) { gsub("\\47", "\47\\\47\47", a); return "\47"a"\47" }
+/<..*>/ {
+	match($0, "<..*>")
+	mid = substr($0, RSTART+1, RLENGTH-2)
+	if ("mairix -r m:" q(mid) | getline file) {
+		print substr($0, 0, RSTART-1) file
+		next
+	}
+}
+{ print }'
diff --git a/contrib/mmairix b/contrib/mmairix
new file mode 100755
index 0000000..133fcfe
--- /dev/null
+++ b/contrib/mmairix
@@ -0,0 +1,4 @@
+#!/bin/sh
+# mmairix QUERY - santoku wrapper around mairix
+
+mairix -r "$@" | mless