plumber

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

commit adf909ebdcc537d0b9c2b15a8a491f7329482d3c
parent b1f479c4414b1299311afeb20c4b072482a903a8
Author: Ian Jones <ian@contractcoder.biz>
Date:   Thu,  4 Jan 2024 14:03:43 +0000

Added opener for RSS feeds and two URI patterns for youtube and yewtu.be.

Signed-off-by: Christoph Lohmann <20h@r-36.net>

Diffstat:
MMakefile | 3++-
MREADME.md | 1+
Mbin/plumber | 2++
Aopeners/feedopener | 12++++++++++++
4 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -26,7 +26,8 @@ install: @echo "export PLUMB_PDF=<your_preferred_pdf_viewer xpdf?>" @echo "export PLUMB_FILEMANAGER=<your_preferred_filemanager ranger?>" @echo "export PLUMB_WEB=<your_preferred_webbrowser firefox?>" - @echo "export PLUMB_TXTWEB=<your_preferred_text_webbrowser lynx?>\n" + @echo "export PLUMB_TXTWEB=<your_preferred_text_webbrowser lynx?>" + @echo "export PLUMB_FEED=<your_preferred_RSS/Atom_client thunderbird?>\n" uninstall: @echo "Uninstalling from $(INSTALL_PATH)\n" diff --git a/README.md b/README.md @@ -35,6 +35,7 @@ variables for openers. % export PLUMB_FILEMANAGER=<your_preferred_filemanager ranger?> % export PLUMB_WEB=<your_preferred_webbrowser firefox?> % export PLUMB_TXTWEB=<your_preferred_text_webbrowser lynx?> + % export PLUMB_FEED=<your_preferred_RSS/Atom_client thunderbird?> ### Manual diff --git a/bin/plumber b/bin/plumber @@ -34,6 +34,8 @@ plumbrules = [ ["^gopher(|s)://.*", "gopheropener '%s'"], ["^http://sprunge.us/.*", "textwebopener '%s'"], ["^http://ix.io/.*", "textwebopener '%s'"], + ["^http(|s)://(|www\.)youtube.com/feeds/videos.xml\?channel_id=.*", "feedopener '%s'"], + ["^http(|s)://(|www\.)yewtu.be/feed/channel/.*", "feedopener '%s'"], ["^http(|s)://(|www\.)youtube.com/(watch|embed).*", "ytopener '%s'"], ["^http(|s)://(|www\.)youtu.be/[\w\-]{10,}\?t=\d+", "ytopener '%s'"], ["^http(|s)://(|www\.)yewtu.be/(watch|embed).*", "ytopener '%s'"], diff --git a/openers/feedopener b/openers/feedopener @@ -0,0 +1,12 @@ +#!/bin/sh + +if [ $# -lt 1 ]; +then + printf "usage: %s URI\n" "$(basename "$0")" >&2 + exit 1 +fi + +uri=$1 + +$XTERM -e sh -c "$PLUMB_FEED \"$uri\"" & +