A CLI tool for downloading content from www.pixiv.net.

mio c88e2e6dae Fix building errors (incorrect parameters) 5 hours ago
docs 43a25fe1df Remove empty EXAMPLES from pixiv_down.1 1 month ago
magickd @ c467022db7 c189814be4 Add ability to build using git submodules & make 4 months ago
source c88e2e6dae Fix building errors (incorrect parameters) 5 hours ago
.editorconfig 8b445b92a2 update .editorconfig 1 month ago
.gitignore 97293526c2 Improve fallback for building in non-VCS env. 4 days ago
.gitmodules 525d01d980 Remove dependency on pixivd 4 months ago
CHANGELOG.md 8401c63096 Update CHANGELOG 5 days ago
COPYING 5437197a76 Initial commit 1 year ago
HowTo-PHPSESSID.txt eb34e2dc10 Add PHPSESSID HowTo 3 months ago
Makefile.in 97293526c2 Improve fallback for building in non-VCS env. 4 days ago
README.md c99b2c5062 Update README 1 month ago
VERSION 97293526c2 Improve fallback for building in non-VCS env. 4 days ago
configure 97293526c2 Improve fallback for building in non-VCS env. 4 days ago
dub.sdl 97293526c2 Improve fallback for building in non-VCS env. 4 days ago
dub.selections.json fa855bc367 Add initial support for building with gamut 1 month ago
fetch_dependencies.sh f5f9f53f5f Remove ability to build with local archives 4 months ago

README.md

pixiv_down

A CLI tool for downloading content from pixiv.

Requirements

D >= 2.097.0 : https://dlang.org

GraphicsMagick >= 1.3.0 : http://www.graphicsmagick.org (only for non-macOS POSIX)

You will also need either Make or dub.

pixiv_down is only tested on Linux and macOS.

POSIX (excluding macOS)

If you are not using dub, or your dub version is older than 1.23.0, then you will need to download magickd. You can run git submodule update --init to fetch the appropriate version.

Build

It's rather simple to build pixiv_down, you just need to run dub build. If you do not have dub, or simply don't want to use it, a configure script is provided to support both macOS and POSIX. Just run ./configure followed by make to build. You can change the D compiler by specifying the DC environment variable: DC=gdc ./configure.

NOTE: The only compiler supported on macOS is DMD.

GraphicsMagick

Depending on your version of GraphicsMagick, you may need to choose a different build configuration.

The different build configurations are: "Q8", "Q16" (default), and "Q32". Use dub build --config <config> to select one.

You can find out which configuration you need by running: gm version | head -n1 | cut -d' ' -f4.

NOTE: GraphicsMagick is only required for building on systems other than macOS. macOS makes use of the native Image I/O framework.

Usage

An expanded version of the help message. Some options may be omitted, please run pixiv_down help <command> for more information on any of the commands.

Usage: pixiv_down <command> <arguments> [options]

Commands:
  artist [-t|--type TYPE] <id> [<id2>, <id3>, ...]

      Download all content of TYPE from the provided account ID(s).
      TYPE can be either manga, illust, or novel, depending on what
      you want to download.

  artwork [--group-errors] <id> [<id2>, <id3>, ...]

      Download an artwork (or manga) with ID <id>.  You can download
      multiple items by passing multiple IDs separated by a space.

      The --group-errors option will change the behaviour such that
      instead of printing any errors after each ID, all errors will
      be printed after attempting to download the last ID.

  bookmarked [--novels] [--private] [--remove-invalid]
             [-s|--skip OFFSET]

      Download all of your bookmarked works.  By default, this will download
      all of the illustrations, manga, and ugoira on your 'public' bookmark
      list.  You can pass the --novels flag to download the novels instead.
      Using the --private flag will cause pixiv_down to download from your
      'private' bookmark list.

      After running this command, a list of IDs will be written to a file
      called 'pixiv_down-missing.txt'.  These IDs represent the works that
      are no longer available on pixiv.  You can pass the --remove-invalid
      flag and pixiv_down will remove these works from your bookmark list.

  compact [-i|--interactive] [-n|--dry-run]

      Go through all the accounts you have downloaded and remove
      duplicated content.  When downloading, pixiv_down creates
      a directory using the current account's display name, which
      can change.  The compact command will move any content from
      the old directories (previous display names) in to the
      directory using the current display name, so long as the
      content is not already present.

      The --interactive option will allow you to choose which
      directory name to use.  The --dry-run option will print
      out the actions that would take place, without actually
      performing the actions.

  daily <-e|--end END> [-b|--begin BEGIN] [-s|--sfw-only]

      Download the latest content from all the accounts you follow.
      The END option specifies the date to stop downloading at. The
      default behaviour is to download everything from the time of
      execution until END. You can optionally specify BEGIN to change
      the date pixiv_down begins downloading from. Both BEGIN and
      END expect a date in the format YYYY-MM-DD.

      The --sfw-only option restricts the content that is downloaded
      to that which is not marked as R-18.

  following <--public|--private> [-s|--skip NUMBER]

      Download all content from the accounts you follow, in order of
      most recently followed. You must specify whether to download
      from accounts you publically follow (--public) or the accounts
      you follow in private (--private).

      If you know that you have already downloaded the first 3
      accounts, you can use the --skip option (--skip 3) which
      will cause pixiv_down to skip over the first 3 accounts.

  novel [--group-errors] <id> [<id2> <id3> ...]

      Download the novel with ID <id>.  You can download multiple
      items by passing multiple IDs separated by a space.

      The --group-errors option will change the behaviour such that
      instead of printing any errors after each ID, all errors will
      be printed after attempting to download the last ID.

  prune [-n|--dry-run] [-q|--quiet]

      Go through all the accounts you have downloaded and remove
      directories for accounts that you no longer follow, or no
      longer exist (i.e. the account has been deleted).

      You will be prompted to remove an account's directories unless
      the --quiet option is used, in which case the directories will
      be removed automatically.

      Passing the --dry-run option will still prompt to remove
      the directories, however, it will not actually remove them.

Notice

pixiv_down does not allow you to download items which you should not be allowed to. By this I mean, if there is something on pixiv that you must pay for in order to access, then pixiv_down won't allow you to download it unless you have paid for it. I'm not aware of anything on pixiv that requires payment, but just a heads up.

It should go without saying, but this is an unofficial program and any usage may result in your account being suspended or terminated.

License

pixiv_down is licensed under the terms of the GNU General Public License, version 3. You can find a copy in the COPYING file, or online at https://www.gnu.org/licenses/gpl-3.0.html.