Add wais:// support. - plumber - Plumber – a modern approach to plumbing
(HTM) git clone git://r-36.net/plumber
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 5c231ed10de55b6ccabafc1b808850490c00f0ef
(DIR) parent 3b37972a2808736aa08262456b2a9ac91a624aa5
(HTM) Author: Christoph Lohmann <20h@r-36.net>
Date: Sat, 24 Feb 2024 18:45:35 +0100
Add wais:// support.
Diffstat:
M bin/plumber | 1 +
A openers/waisopener | 11 +++++++++++
2 files changed, 12 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/bin/plumber b/bin/plumber
@@ -73,6 +73,7 @@ plumbrules = [
["^portage:.*", "portageopener '%s'"],
# Just a try to imitate Ubuntu.
["^apt:.*", "portageopener '%s'"],
+ ["^wais:.*", "waisopener '%s'"],
["^wikipedia:.*", "wikipediaopener '%s'"],
["^wikipedia-[a-zA-Z]*:.*", "wikipediaopener '%s'"],
["^wiki:.*", "wikiopener '%s'"],
(DIR) diff --git a/openers/waisopener b/openers/waisopener
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+if [ $# -lt 1 ];
+then
+ printf "usage: %s URI\n" "$(basename "$0")" >&2
+ exit 1
+fi
+
+cd $HOME/Downloads
+$XTERM -e sh -c "$PLUMB_WAIS \"$1\""
+