Add an opener for poorlydrawnlines.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 cc50e861e7d21fa74908e3b6da77138f8f04bef5
(DIR) parent 8b6ef38cfd41b436ad6adaf0aa50db7d8ef63216
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Tue, 11 Sep 2018 01:06:10
Add an opener for poorlydrawnlines.com comics
Diffstat:
openers/poorlydrawnlines | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff -r 8b6ef38cfd41 -r cc50e861e7d2 openers/poorlydrawnlines
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/openers/poorlydrawnlines Tue Sep 11 01:06:10 2018 +0200
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+for u in "$@"; do
+ pngurl=$(curl -gs -L "$u" |
+ xmllint --html --xpath 'string(//div[@class="post"]//img/@src)' - 2>/dev/null)
+ plumb "${pngurl}"
+done