commit 23d8c0fc0a4a5805734ea18bc510059fb6ef8a33 parent 56533815bbba1db6a0a1a9bac8e48e0c0df92547 Author: parazyd <parazyd@dyne.org> Date: Thu, 22 Feb 2018 01:39:40 +0100 add chandl Diffstat:
A | chandl | | | 23 | +++++++++++++++++++++++ |
1 file changed, 23 insertions(+), 0 deletions(-)
diff --git a/chandl b/chandl @@ -0,0 +1,23 @@ +#!/bin/sh + +case "$1" in + *boards.4chan.org*) + imgs='i.4cdn.org' + ;; + *8ch.net*) + imgs='media.8ch.net' + ;; + *lainchan.org*) + imgs='.* https:\/\/lainchan.org\/.*\/src\/' + ;; + *arisuchan.jp*) + imgs='.* https:\/\/arisuchan.jp\/.*/src\/' + ;; + *) + echo 'Unsupported URL.' + exit 1 + ;; +esac + +lynx -dump "$1" | awk '/^References/,EOF' | awk '/'"$imgs"'/ {print $2}' | + sort | uniq | while read foo ; do wget -c $foo ; done