Create a gist now

Instantly share code, notes, and snippets.

@cympfh /2chimg.sh
Last active Aug 29, 2015

What would you like to do?
#!/bin/bash
URL=$1
OUT=/tmp/list.html
curl -s $URL | nkf >/tmp/source
cat << EOM > $OUT
<style>
img { width: 100%; }
</style>
<body>
EOM
cat /tmp/source | grep -o 'ttp[^ ]*jpg'|sed 's/^ttp/http/g' |
grep -v blog-imgs |
grep -v blogimgs\.jp |
grep -v jump\.2ch |
sed 's/.*/<img src=&>/g' >> $OUT
echo file://$OUT
echo last: `cat /tmp/source | grep -o '<dt>[0-9]*' | tail -1 | sed 's/<dt>//g'`
Owner

cympfh commented Aug 1, 2015

% 2chimg http://hayabusa7.2ch.net/test/read.cgi/livetx/1438360449/l200
file:///tmp/list.html
last: 949
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment