How to use CLI - ZayrexDev/ACGPicDownload GitHub Wiki

Fetching Pixiv

We are currently working on this feature.

For now, you can look up the DeepWiki for detailed usage.

Fetching API

To fetch API, you need to use fetch command.

Usage

java -jar ACGPicDownload.jar fetch [参数]

Arguments

Argument Description
--list-sources List all the sources
-s, --source source_name Set the source to use. If it's not set, then the program will use the first source in the config.
-o, --output output_dictionary Set the output dictionary. If it's not set, the program will use the dictionary of the program.
--arg key1=value1,key2=value2,... custom the argument in the url. Please seeurl
-m, --max-thread count The the max count of download progress at the same time. If count is not given then the count will be unlimited.
-t, --times times Set times to fetch(Not Recommended, may trigger API limits)
-f,--full Download and save the image's json file to the json file that has the same name as the image file
-p, --proxy address:port Set the proxy of fetching and downloading

...to be more specific?

Run directly

You can run ACGPicDownload.jar directly, in this case, program will use default Lolicon source...

>java -jar ACGPicDownload.jar

[Fetch] Fetching pictures from https://api.lolicon.app/setu/v2?r18=0&num=1 ...
[Fetch] Got 1 pictures!
[Fetch] Downloading (FileName) to (OutputDir) from (Link) ...

When the program is done, you should be able to find the picture under the program's folder.

Add arguments

If you want to add some customize argument, then you can follow these steps...

  1. First, use --list-sources to see all the sources...

    >java -jar ACGPicDownload.jar --list-sources
    
    [Fetch] Name      |  Description                                                |  URL
    
    [Fetch] lolicon   |  Picture from Lolicon API (api.lolicon.app)                 |  https://api.lolicon.app/setu/v2?{r18=$r18}{&num=$num}{&keyword=$keyword}{&tag=$tag}
    
    [Fetch] dmoe      |  Picture from Dmoe API (dmoe.cc)                            |  https://www.dmoe.cc/random.php
    
    [Fetch] mirlkoi   |  Picture from MirlKoiAPI (api.iw233.cn)                     |  https://iw233.cn/api.php?sort=random&type=json{&num=$num}
    ......

    If it's the first time running, or you haven't config sources.json yet, then the program will copy default sources.json to its path.

  2. Add custom arguments

    1. First, choose a source

      We'll use lolicon source in this case.

    2. Custom arguments

      In the lolicon source, the {num=$num} and other variable is arguments. As for them, you can see the source's page to know more. We are setting num to 5 in this case. What's more, we want the program to download to pic folder ...

    3. Run

      According to our choices, the source is lolicon, num is 5, download to pic folder, the arguments should be like:-s lolicon,-o pic,--arg num=5 So, we need to run like this:

      >java -jar ACGPicDownload.jar -s lolicon -o pic --arg num=5
      
      [Fetch] Fetching pictures from https://api.lolicon.app/setu/v2?r18=0&num=5 ...
      [Fetch] Got 5 pictures!
      [Fetch] Downloading (FileName1) to (OutputDir) from (Link1) ...
      [Fetch] Downloading (FileName2) to (OutputDir) from (Link2) ...
      [Fetch] Downloading (FileName3) to (OutputDir) from (Link3) ...
      [Fetch] Downloading (FileName4) to (OutputDir) from (Link4) ...
      [Fetch] Downloading (FileName5) to (OutputDir) from (Link5) ...

      When it's done, you should be able to see 5 images under the pic folder.

⚠️ **GitHub.com Fallback** ⚠️