plumber

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

commit dfad908d4e64d15222bed8cbc596e07e6f1c929e
parent 61cdc847657eae370d2ff1b5acfba9ddac658ff5
Author: Christoph Lohmann <20h@r-36.net>
Date:   Tue, 18 Apr 2017 21:34:01 +0200

Add pubmed: URI.

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

diff --git a/bin/plumber b/bin/plumber @@ -49,6 +49,7 @@ plumbrules = [ ["^moz://:*", "mozopener '%s'"], ["^mms://.*", "mediaopener '%s'"], ["^paper:.*", "paperopener '%s'"], + ["^pubmed:.*", "pubmedopener '%s'"], ["^rfc:.*", "rfcopener '%s'"], ["^rp:.*", "rpopener '%s'"], ["^rpo:.*/", "rpopener -o '%s'"], diff --git a/openers/pubmedopener b/openers/pubmedopener @@ -0,0 +1,13 @@ +#!/bin/sh + +if [ $# -lt 1 ]; +then + printf "usage: [-o] %s URI\n" "$(basename "$0")" >&2 + exit 1 +fi + +URI="$1" +SEARCH="$(printf "%s" "${URI}" | cut -d':' -f 2-)" + +pubmed "$SEARCH" +