Add theoatmeal opener for the theoatmeal.com 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 427dace8a3dfb06b7459c7f92e2a69aad764d8e3
 (DIR) parent 9baef15a2e40fb69e68af0deba3e44dd1287e12e
 (HTM) Author: Leonardo Taccari <iamleot@gmail.com>
       Date:   Thu,  4 Oct 2018 22:38:15 
       
       Add theoatmeal opener for the theoatmeal.com comics
       
       Diffstat:
        openers/theoatmeal |  7 +++++++
        rules              |  3 +++
        2 files changed, 10 insertions(+), 0 deletions(-)
       ---
       diff -r 9baef15a2e40 -r 427dace8a3df openers/theoatmeal
       --- /dev/null   Thu Jan 01 00:00:00 1970 +0000
       +++ b/openers/theoatmeal        Thu Oct 04 22:38:15 2018 +0200
       @@ -0,0 +1,7 @@
       +#!/bin/sh
       +
       +for u in "$@"; do
       +       pngurl=$(curl -gs -L "$u" |
       +           xmllint --html --xpath 'string(//div[@id="comic"]//img/@src)' - 2>/dev/null )
       +       plumb "${pngurl}"
       +done
       diff -r 9baef15a2e40 -r 427dace8a3df rules
       --- a/rules     Sun Sep 30 10:18:13 2018 +0200
       +++ b/rules     Thu Oct 04 22:38:15 2018 +0200
       @@ -79,6 +79,9 @@
        *://blog.toggl.com/* )
               open "togglcomic" "$u"
               ;;
       +*://theoatmeal.com/comics/* )
       +       open "theoatmeal" "$u"
       +       ;;
        *://www.reddit.com/* )
               open "reddit" "$u"
               ;;