项目作者: xeron

项目描述 :
Danbooru, Konachan, Behoimi (3dbooru) and Yandere images downloader
高级语言: Ruby
项目地址: git://github.com/xeron/danbooru-ruby-grabber.git
创建时间: 2009-07-31T09:50:30Z
项目社区:https://github.com/xeron/danbooru-ruby-grabber

开源协议:MIT License

下载


Overview

danbooru-ruby-grabber is a danbooru downloader — simple script which downloads images from danbooru.donmai.us, konachan.com, behoimi.org and yande.re. Support of any danbooru-powered site could be added easily.

Usage

  1. Usage: danbooru.rb [options] "tags"
  2. Target:
  3. -b, --board BOARDNAME Target board. Supported options: danbooru (default), konachan, behoimi, yandere
  4. -P, --pool POOL_ID Pool ID (tags will be ignored)
  5. Storage options:
  6. -s, --storage DIR Storage mode (all images in one dir and symlinks in tagged dirs)
  7. -d, --directory BASE_DIR Base directory to save images. By default it uses the same location as script
  8. -f, --filename PATTERN Filename pattern. Supported options: id (default), md5, tags, url (old default)
  9. Note: `-f tags` could miss some files due to filesystems' filename length limitation.
  10. Authentication:
  11. This is optional, but recommended since some boards block access without authentication.
  12. -u, --user USERNAME Username
  13. -p, --password PASSWORD Password (API Key for danbooru)
  14. Tools:
  15. Ruby's file saver is used by default. You can change it using this options. `wget` or `curl` binaries should be available.
  16. -w, --wget Download using wget
  17. -c, --curl Download using curl
  18. Limits:
  19. This option could be used multiple times with different limiters.
  20. -l, --limit LIMITER Limiters in the following format: limiter=number. Supported limiters: pages, posts, per_page
  21. Help:
  22. -h, --help Print a help message

Notes

  • To prevent duplicates files are stored using post id based filenames. You can change this behavior using -f option.

  • Using -f tags could miss some files due to filesystems’ filename length limitation.

  • Always use -u and -p options with danbooru, because they block requests without login and password.

  • Number of tags you can use at the same time could be limited by board (for example danbooru limits basic accounts by 2 tags)

  • Images are stored in tag-named directory.

  • Script creates file named files.bbs with all tags of each image.

Installation

You need json and nokogiri gems to be installed. You can install them by this command:

gem install json nokogiri

Note: may be you need to use sudo.

Bonus

Have fun.