ref: 7c063c346a361bca2e57e26e04e8fb48a05c8c7e
parent: 7c4227aa88e4213f56a7940732eff3769a2c627e
author: qwx <qwx@sciops.net>
date: Wed Jun 12 22:49:19 EDT 2024
update plumb rules: handle svg as any other image, update imgur rule
--- a/plumbing
+++ b/plumbing
@@ -10,11 +10,12 @@
plumb start window -dy 800 man $2 $1 '; read'
# images
-type is text
-data matches '[a-zA-Z¡-0-9_\-.,/]+'
-data matches '([a-zA-Z¡-0-9_\-.,/]+)\.(svg|SVG)'
-arg isfile $0
-plumb start svg -9 $0 | plumb -id image
+type is text
+data matches '[a-zA-Z¡-0-9_\-.,/]+'
+data matches '([a-zA-Z¡-0-9_\-.,/]+)\.(jpe?g|JPE?G|gif|GIF|tiff?|TIFF?|ppm|PPM|bit|BIT|png|PNG|pgm|PGM|bmp|BMP|yuv|YUV|tga|TGA|svg|SVG)'
+arg isfile $0
+plumb to image
+plumb client page -wi
# audio
@@ -110,10 +111,11 @@
plumb to web
plumb client window $browser
-# thanks khm/umbraticus
type is text
-data matches https?://imgur.com/a/[a-zA-Z0-9]+
-plumb start rc -c 'hget '$data' | sed -n ''s/.*<meta property="og:image"[^>]+content="([^"?]+).*/\1/p'' | xargs -n 1 plumb'
+data matches https?://imgur.com/a/([a-zA-Z0-9]+)
+data set https://imgin.voidnet.tech/a/$1
+plumb to web
+plumb client window $browser
# gemnine
type is text