Add patchfriday.com comic strip opener - 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 9d565ec0d8d221d5b31d40b9e82cd3f0155de9ff
(DIR) parent 743f24d3b5247f9218b568d4d7c087070f46069b
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Sat, 3 Aug 2019 15:15:47
Add patchfriday.com comic strip opener
Diffstat:
openers/patchfriday | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff -r 743f24d3b524 -r 9d565ec0d8d2 openers/patchfriday
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/openers/patchfriday Sat Aug 03 15:15:47 2019 +0200
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+for u in "$@"; do
+ pngurl=$(curl -gs -L "$u" |
+ xmllint --html --xpath 'string(//div[@id="strip_image"]//img/@src)' - 2>/dev/null |
+ sed 's;^/;https://patchfriday.com/;' )
+ plumb "${pngurl}"
+done