Skip to content

Using Batch Job (Experimental)

Nandaka edited this page Oct 15, 2021 · 10 revisions

General Usage

  1. Create batch_job.json in the application folder using your favorite text editor.
  2. Follow below template
{
    "jobs": {
        "job-3-marine": {
            "enabled": true,
            "job_type": "3",
            "tags": "宝鐘マリン",
            "start_page": 1,
            "end_page": 0,
            "wildcard": true,
            "title_caption": false,
            "bookmark_count": 1000,
            "sort_order": "date_d",
            "comments": "you can use \"sort_order\" if your account is premium, else use \"oldest_first\": true",
            "type_mode": "a",
            "option": {
                "filenameFormat": "%searchTags%/%member_id% %urlFilename% - %title%",
                "filenameMangaFormat": "%searchTags%/%member_id% %urlFilename% - %title%",
                "filenameInfoFormat": "%searchTags%/%member_id% %urlFilename% - %title%",
                "filenameMangaInfoFormat": "%searchTags%/%member_id% %urlFilename% - %title%",
                "avatarNameFormat": "%searchTags%/%member_id% %urlFilename% - %title%",
                "useTagsAsDir": false,                
                "rootDirectory": "z:/test/"
            }
        },
        "job-1-member-id-all": {
            "enabled": false,
            "job_type": "1",
            "member_id": 1793569,
            "start_page": 1,
            "end_page": 0,
            "from_bookmark": false,
            "option": {
                "filenameFormat": "%searchTags%\\%member_id% %member_token%\\%R-18% %urlFilename% - %title%",
                "filenameMangaFormat": "%searchTags%\\%member_id% %member_token%\\%R-18% %urlFilename% - %title%",
                "filenameInfoFormat": "%searchTags%\\%member_id% %member_token%\\%R-18% %urlFilename% - %title%",
                "filenameMangaInfoFormat": "%searchTags%\\%member_id% %member_token%\\%R-18% %urlFilename% - %title%",
                "avatarNameFormat": "",
                "rootDirectory": "D:\\Temp\\Pixiv2\\",
                "r18mode": false,
                "extensionFilter": "ugoira|png|jpg"
            }
        },
        "job-1-member-id-r18": {
            "enabled": false,
            "job_type": "1",
            "member_id": 660275,
            "start_page": 1,
            "end_page": 0,
            "from_bookmark": false,
            "option": {
                "filenameFormat": "%searchTags%\\%member_id% %member_token%\\%R-18% %urlFilename% - %title%",
                "filenameMangaFormat": "%searchTags%\\%member_id% %member_token%\\%R-18% %urlFilename% - %title%",
                "filenameInfoFormat": "%searchTags%\\%member_id% %member_token%\\%R-18% %urlFilename% - %title%",
                "filenameMangaInfoFormat": "%searchTags%\\%member_id% %member_token%\\%R-18% %urlFilename% - %title%",
                "avatarNameFormat": "",
                "rootDirectory": "D:\\Temp\\Pixiv2\\",
                "r18mode": true
            }
        },
        "job-1-member-id-r182": {
            "enabled": false,
            "job_type": "1",
            "member_id": 14095911,
            "start_page": 1,
            "end_page": 0,
            "from_bookmark": false,
            "option": {
                "filenameFormat": "%searchTags%\\%member_id% %member_token%\\%R-18% %urlFilename% - %title%",
                "filenameMangaFormat": "%searchTags%\\%member_id% %member_token%\\%R-18% %urlFilename% - %title%",
                "filenameInfoFormat": "%searchTags%\\%member_id% %member_token%\\%R-18% %urlFilename% - %title%",
                "filenameMangaInfoFormat": "%searchTags%\\%member_id% %member_token%\\%R-18% %urlFilename% - %title%",
                "avatarNameFormat": "",
                "rootDirectory": "D:\\Temp\\Pixiv2\\",
                "r18mode": true
            }
        },
        "job-1-member-id-no-tags": {
            "enabled": false,
            "job_type": "1",
            "member_id": 9459043,
            "start_page": 1,
            "end_page": 0,
            "from_bookmark": false,
            "option": {
                "filenameFormat": "%searchTags%/%member_id% %member_token%/%R-18% %urlFilename% - %title%",
                "filenameMangaFormat": "%searchTags%/%member_id% %member_token%/%R-18% %urlFilename% - %title%",
                "filenameInfoFormat": "%searchTags%/%member_id% %member_token%/%R-18% %urlFilename% - %title%",
                "filenameMangaInfoFormat": "%searchTags%/%member_id% %member_token%/%R-18% %urlFilename% - %title%",
                "avatarNameFormat": "%searchTags%/%member_id% %member_token%/%R-18% %urlFilename% - %title%",
                "rootDirectory": "d:/test/"
            }
        },
        "job-1-member-id-with-tags": {
            "enabled": true,
            "job_type": "1",
            "member_id": 5375435,
            "start_page": 1,
            "end_page": 0,
            "tags": "R-18",
            "option": {
                "rootDirectory": "d:/test/"
            }
        },
        "job-1-multi-member-id": {
            "enabled": false,
            "job_type": "1",
            "member_ids": [2344550, 24164271, 544479],
            "start_page": 1,
            "end_page": 2,
            "tags": "R-18",
            "option": {
                "rootDirectory": "d:/test/"
            }
        },
        "job-2-single-image": {
            "enabled": false,
            "job_type": "2",
            "image_id": 54973381
        },
        "job-2-multi-images": {
            "enabled": false,
            "job_type": "2",
            "image_ids": [73988118, 57959650, 78942244, 80247847, 81157603],
            "option": {
                "rootDirectory": "d:/test/"
            }
        },
        "job-3-tags-download": {
            "enabled": false,
            "job_type": "3",
            "tags": "島風",
            "start_page": 1,
            "end_page": 0,
            "wildcard": true,
            "title_caption": false,
            "start_date": "2020-01-01",
            "end_date": "2020-01-31",
            "bookmark_count": 0,
            "oldest_first": true,
            "type_mode": "a",
            "option": {
                "filenameFormat": "%artist% (%member_id%)/%urlFilename% - %title%",
                "filenameMangaFormat": "%artist% (%member_id%)/%urlFilename% - %title%",
                "filenameInfoFormat": "%artist% (%member_id%)/%urlFilename% - %title%",
                "filenameMangaInfoFormat": "%artist% (%member_id%)/%urlFilename% - %title%",
                "avatarNameFormat": "%artist% (%member_id%)/%urlFilename% - %title%",
                "useTagsAsDir": true,                
                "rootDirectory": "d:/test/"
            }
        }
    }
}

About job_type

  • 1 = Handle option 1 and **11 ** from main menu, support single or multiple artists. Also cover option 4 by using this list.
    • member_ids = for multiple artists, takes priority.
    • member_id = for single artist.
    • from_bookmark = set true to download from the artist's bookmarks instead (option 11).
  • 2 = Handle option 2 from main menu, support single or multiple image ids.
    • image_ids = for multiple image ids, takes priority.
    • image_id = for single image id.
  • 3 = Handle option 3, 9, and 10 from main menu. Also cover option 7 by using this list.
    • member_id = enter the member id for option 10, takes priority.
    • title_caption = set to true to download based on title/caption (option 9)
    • sort_order = you can use this if you are using premium account ('date_d', 'date', 'popular_d', 'popular_male_d', 'popular_female_d'), else use oldest_first instead.

About option

In general, all job option available for every job type with some exception. Available option:

  • filenameFormat temporarily overwrite the settings in config.ini for given job.
  • filenameMangaFormat' temporarily overwrite the settings in config.ini` for given job.
  • filenameInfoFormat temporarily overwrite the settings in config.ini for given job.
  • filenameMangaInfoFormat temporarily overwrite the settings in config.ini for given job.
  • avatarNameFormat temporarily overwrite the settings in config.ini for given job.
  • rootDirectory temporarily overwrite the settings in config.ini for given job.
  • r18mode temporarily overwrite the settings in config.ini for given job.
  • extensionFilter apply to all job type. Using regex for matching, remove it if you want to download all files. Separate each extension using |. For example, png|zip|ugoira|jpg
  • useTagsAsDir only work for job_type = 3
Clone this wiki locally