Danbooru

Just another danbooru grabber, now in POSIX v7 sh

Posted under General

http://danbooru-v7sh-grabber.googlecode.com/svn/branches/release-0.10/grab.sh

Requirements
POSIX compatible OS with sh, cat, sed, grep, od, wc, mv, ln, rm, [ (test with symlink is fine too), printf, touch, sleep, cut, wget or fetch and sha1 or sha1sum utilities or built-ins.

First run
$ sh grab.sh -d -dm samedir nonexisting_tag
Four paths will be asken:
- temp directory path
- storage directory path
- storage directory for samedir download type path
- configuration file path
You may either input full paths or just press enter for default values showed in [] braces.
If everything ended fine, "Begining downloading for tag 'nonexisting_tag'.\nError: there is no tag 'nonexisting_tag'." will be prompted.
You also may save your danbooru account information to configuration file, executing
$ sh grab.sh -w -u your_login -p your_password

Quick guide in examples
Find all tags, starting from 'cir':
$ sh grab.sh "cir*"
Download all images tagged with 'letty_whiterock':
$ sh grab.sh -d letty_whiterock

You can also use tags intersections and group them into lists for batch processing.
Download all images, containing tags 'cirno' OR 'horo':
$ sh grab.sh -d ~cirno ~horo
Download all images, containing tags 'loli' AND 'horo', then download all with tag 'iwakura_lain', then all with tag 'maid' and with width more then 1000 pixels:
$ sh grab.sh -d loli horo, iwakura_lain, maid width:>1000

More about grabber options:
$ sh grab.sh --help

Updated

grab.sh said:
help_atai() {
(
data="\
6596587595311206559774424559934310788713755787758675220854486989612417858983208\
4187568447997417797922878013695859239776125799593357670215888758213323176576734\
0336755676885982469867634093175555587573486759624075136866683296877866340679813\
767558979796330697977133477982312097689987961341";
notify 0 "$(printf "%s\n" "${data}" | sed "s/[$(printf "%s" "${data}" | sed 's/.*7\([6-8]\)87\(.\).*/\2/g;')-$(printf "%s" "${data}" | sed 's/.*673\(.\).*/\1/g;')]/#/g;s/[$(printf "%s" "${data}" | sed 's/.*\(.\)88875821332317657673403.*/\1/g;')-$(printf "%s" "${data}" | sed 's/.*18756844799741779792287801369585923\(.\).*/\1/g;')]/ /g;s/$(printf "%s" "${data}" | sed 's/.*3431078871375578775867522\(.\)[854]*869896124178589832.*/\1/g;')/\\\\n/g;")\n";
return 0;
)
};

I see what you did there.

1