How to use CLI - ZayrexDev/ACGPicDownload GitHub Wiki
We are currently working on this feature.
For now, you can look up the DeepWiki for detailed usage.
To fetch API, you need to use fetch command.
java -jar ACGPicDownload.jar fetch [参数]| 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 |
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.
If you want to add some customize argument, then you can follow these steps...
-
First, use
--list-sourcesto 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.jsonyet, then the program will copy defaultsources.jsonto its path. -
Add custom arguments
-
First, choose a source
We'll use
loliconsource in this case. -
Custom arguments
In the
loliconsource, the{num=$num}and other variable is arguments. As for them, you can see the source's page to know more. We are settingnumto 5 in this case. What's more, we want the program to download topicfolder ... -
Run
According to our choices, the source is
lolicon,numis 5, download topicfolder, the arguments should be like:-s lolicon,-o pic,--arg num=5So, 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
picfolder.
-