Add an opener for abstrusegoose comics - plumb - Open certain URL patterns with an ad-hoc opener (plumber) (HTM) hg clone https://bitbucket.org/iamleot/plumb (DIR) Log (DIR) Files (DIR) Refs (DIR) README --- (DIR) changeset 86ab2d8a03ee9956349e144ad05003a720ecd804 (DIR) parent 7785631a4a2bd52c87bc7c28be07bfc22623781b (HTM) Author: Leonardo Taccari <iamleot@gmail.com> Date: Wed, 6 Mar 2019 18:42:35 Add an opener for abstrusegoose comics Diffstat: openers/abstrusegoose | 7 +++++++ rules | 3 +++ 2 files changed, 10 insertions(+), 0 deletions(-) --- diff -r 7785631a4a2b -r 86ab2d8a03ee openers/abstrusegoose --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openers/abstrusegoose Wed Mar 06 18:42:35 2019 +0100 @@ -0,0 +1,7 @@ +#!/bin/sh + +for u in "$@"; do + pngurl=$(curl -gs -L "$u" | + xmllint --html --xpath 'string(//section//img/@src)' - 2>/dev/null ) + plumb "${pngurl}" +done diff -r 7785631a4a2b -r 86ab2d8a03ee rules --- a/rules Wed Mar 06 18:33:00 2019 +0100 +++ b/rules Wed Mar 06 18:42:35 2019 +0100 @@ -63,6 +63,9 @@ *://warandpeas.com/[0-9]*/[0-9]*/[0-9]*/*) open "ogimage" "$u" ;; +*://abstrusegoose.com/[0-9]* ) + open "abstrusegoose" "$u" + ;; *://buttersafe.com/*/*/*/* | \ *://feedproxy.google.com/*/Buttersafe/* ) open "buttersafe" "$u"