plumber

Plumber – a modern approach to plumbing
git clone git://r-36.net/plumber
Log | Files | Refs | LICENSE

commit 09b5306793937ca140918ac54a6c612de50ce579
parent 697ce9b14111d7caa5a13e57b78eca50a0b6d130
Author: Christoph Lohmann <20h@r-36.net>
Date:   Sun,  9 Apr 2017 21:06:15 +0200

Add searx: support. (Online search.)

Diffstat:
bin/plumber | 1+
openers/searxopener | 13+++++++++++++
2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/bin/plumber b/bin/plumber @@ -55,6 +55,7 @@ plumbrules = [ ["^rtmp://.*", "mediaopener '%s'"], ["^rtmfp://.*", "mediaopener '%s'"], ["^rtsp://.*", "mediaopener '%s'"], + ["^searx:.*", "searxopener '%s'"], ["^udp://.*", "mediaopener '%s'"], ["^telnet(s|)(4|6|)://.*", "telnetopener '%s'"], ["^ssh://.*", "sshopener '%s'"], diff --git a/openers/searxopener b/openers/searxopener @@ -0,0 +1,13 @@ +#!/bin/sh + +if [ $# -lt 1 ]; +then + printf "usage: %s [-o] URI\n" "$(basename "$0")" >&2 + exit 1 +fi + +uri="$1" +search="$(printf "%s" "${uri}" | cut -d':' -f 2-)" + +searx "${search}" +