2018-03-05 18:37:21 +01:00
|
|
|
|
{
|
|
|
|
|
"extractor":
|
|
|
|
|
{
|
2018-03-22 10:01:50 +01:00
|
|
|
|
"base-directory": "~/gallery-dl/",
|
2021-10-15 19:00:04 +02:00
|
|
|
|
|
|
|
|
|
"#": "set global archive file for all extractors",
|
2018-03-12 18:15:30 +01:00
|
|
|
|
"archive": "~/gallery-dl/archive.sqlite3",
|
2023-02-05 16:05:13 +01:00
|
|
|
|
"archive-pragma": ["journal_mode=WAL", "synchronous=NORMAL"],
|
2018-03-05 18:37:21 +01:00
|
|
|
|
|
2022-02-04 23:38:22 +01:00
|
|
|
|
"#": "add two custom keywords into the metadata dictionary",
|
|
|
|
|
"#": "these can be used to further refine your output directories or filenames",
|
|
|
|
|
"keywords": {"bkey": "", "ckey": ""},
|
|
|
|
|
"#": "make sure that custom keywords are empty, i.e. they don't appear unless specified by the user",
|
|
|
|
|
"keywords-default": "",
|
|
|
|
|
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"#": "replace invalid path characters with unicode alternatives",
|
|
|
|
|
"path-restrict": {
|
|
|
|
|
"\\": "⧹",
|
|
|
|
|
"/" : "⧸",
|
|
|
|
|
"|" : "│",
|
|
|
|
|
":" : "꞉",
|
|
|
|
|
"*" : "∗",
|
|
|
|
|
"?" : "?",
|
|
|
|
|
"\"": "″",
|
|
|
|
|
"<" : "﹤",
|
|
|
|
|
">" : "﹥"
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"#": "write tags for several *booru sites",
|
2019-06-07 13:47:02 +02:00
|
|
|
|
"postprocessors": [
|
|
|
|
|
{
|
|
|
|
|
"name": "metadata",
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"mode": "tags",
|
|
|
|
|
"whitelist": ["danbooru", "moebooru", "sankaku"]
|
2019-06-07 13:47:02 +02:00
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
|
2018-03-05 18:37:21 +01:00
|
|
|
|
"pixiv":
|
|
|
|
|
{
|
2023-02-05 16:05:13 +01:00
|
|
|
|
"#": "override global archive path for pixiv",
|
2018-03-12 18:15:30 +01:00
|
|
|
|
"archive": "~/gallery-dl/archive-pixiv.sqlite3",
|
|
|
|
|
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"#": "set custom directory and filename format strings for all pixiv downloads",
|
2018-03-12 18:15:30 +01:00
|
|
|
|
"filename": "{id}{num}.{extension}",
|
|
|
|
|
"directory": ["Pixiv", "Works", "{user[id]}"],
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"refresh-token": "aBcDeFgHiJkLmNoPqRsTuVwXyZ01234567890-FedC9",
|
2018-03-12 18:15:30 +01:00
|
|
|
|
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"#": "transform ugoira into lossless MKVs",
|
|
|
|
|
"ugoira": true,
|
|
|
|
|
"postprocessors": ["ugoira-copy"],
|
2018-03-12 18:15:30 +01:00
|
|
|
|
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"#": "use special settings for favorites and bookmarks",
|
2018-03-12 18:15:30 +01:00
|
|
|
|
"favorite":
|
2018-03-05 18:37:21 +01:00
|
|
|
|
{
|
2018-03-12 18:15:30 +01:00
|
|
|
|
"directory": ["Pixiv", "Favorites", "{user[id]}"]
|
2018-03-05 18:37:21 +01:00
|
|
|
|
},
|
|
|
|
|
"bookmark":
|
|
|
|
|
{
|
2018-03-12 18:15:30 +01:00
|
|
|
|
"directory": ["Pixiv", "My Bookmarks"],
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"refresh-token": "01234567890aBcDeFgHiJkLmNoPqRsTuVwXyZ-ZyxW1"
|
2018-03-05 18:37:21 +01:00
|
|
|
|
}
|
|
|
|
|
},
|
2018-03-12 18:15:30 +01:00
|
|
|
|
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"danbooru":
|
|
|
|
|
{
|
|
|
|
|
"ugoira": true,
|
|
|
|
|
"postprocessors": ["ugoira-webm"]
|
|
|
|
|
},
|
|
|
|
|
|
2018-03-12 18:15:30 +01:00
|
|
|
|
"exhentai":
|
2018-03-05 18:37:21 +01:00
|
|
|
|
{
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"#": "use cookies instead of logging in with username and password",
|
2018-03-12 18:15:30 +01:00
|
|
|
|
"cookies":
|
|
|
|
|
{
|
|
|
|
|
"ipb_member_id": "12345",
|
2020-05-22 01:26:58 +02:00
|
|
|
|
"ipb_pass_hash": "1234567890abcdef",
|
|
|
|
|
"igneous" : "123456789",
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"hath_perks" : "m1.m2.m3.a-123456789a",
|
|
|
|
|
"sk" : "n4m34tv3574m2c4e22c35zgeehiw",
|
|
|
|
|
"sl" : "dm_2"
|
2018-03-12 18:15:30 +01:00
|
|
|
|
},
|
|
|
|
|
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"#": "wait 2 to 4.8 seconds between HTTP requests",
|
|
|
|
|
"sleep-request": [2.0, 4.8],
|
2018-03-12 18:15:30 +01:00
|
|
|
|
|
|
|
|
|
"filename": "{num:>04}_{name}.{extension}",
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"directory": ["{category!c}", "{title}"]
|
2018-03-05 18:37:21 +01:00
|
|
|
|
},
|
2018-03-12 18:15:30 +01:00
|
|
|
|
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"sankaku":
|
2018-06-08 18:29:58 +02:00
|
|
|
|
{
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"#": "authentication with cookies is not possible for sankaku",
|
|
|
|
|
"username": "user",
|
|
|
|
|
"password": "#secret#"
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"furaffinity": {
|
|
|
|
|
"#": "authentication with username and password is not possible due to CAPTCHA",
|
|
|
|
|
"cookies": {
|
|
|
|
|
"a": "01234567-89ab-cdef-fedc-ba9876543210",
|
|
|
|
|
"b": "fedcba98-7654-3210-0123-456789abcdef"
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"descriptions": "html",
|
|
|
|
|
"postprocessors": ["content"]
|
2018-06-08 18:29:58 +02:00
|
|
|
|
},
|
|
|
|
|
|
2020-05-22 01:26:58 +02:00
|
|
|
|
"deviantart":
|
|
|
|
|
{
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"#": "download 'gallery' and 'scraps' images for user profile URLs",
|
2020-05-22 01:26:58 +02:00
|
|
|
|
"include": "gallery,scraps",
|
2021-10-15 19:00:04 +02:00
|
|
|
|
|
|
|
|
|
"#": "use custom API credentials to avoid 429 errors",
|
|
|
|
|
"client-id": "98765",
|
|
|
|
|
"client-secret": "0123456789abcdef0123456789abcdef",
|
|
|
|
|
"refresh-token": "0123456789abcdef0123456789abcdef01234567",
|
|
|
|
|
|
|
|
|
|
"#": "put description texts into a separate directory",
|
2020-05-22 01:26:58 +02:00
|
|
|
|
"metadata": true,
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"postprocessors": [
|
|
|
|
|
{
|
|
|
|
|
"name": "metadata",
|
|
|
|
|
"mode": "custom",
|
|
|
|
|
"directory" : "Descriptions",
|
|
|
|
|
"content-format" : "{description}\n",
|
|
|
|
|
"extension-format": "descr.txt"
|
|
|
|
|
}
|
|
|
|
|
]
|
2020-05-22 01:26:58 +02:00
|
|
|
|
},
|
|
|
|
|
|
2022-09-25 14:03:08 +02:00
|
|
|
|
"kemonoparty": {
|
|
|
|
|
"postprocessors": [
|
|
|
|
|
{
|
|
|
|
|
"name": "metadata",
|
|
|
|
|
"event": "post",
|
|
|
|
|
"filename": "{id} {title}.txt",
|
|
|
|
|
|
|
|
|
|
"#": "write text content and external URLs",
|
|
|
|
|
"mode": "custom",
|
|
|
|
|
"format": "{content}\n{embed[url]:?/\n/}",
|
|
|
|
|
|
|
|
|
|
"#": "onlx write file if there is an external link present",
|
|
|
|
|
"filter": "embed.get('url') or re.search(r'(?i)(gigafile|xgf|1drv|mediafire|mega|google|drive)', content)"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
|
2018-03-05 18:37:21 +01:00
|
|
|
|
"flickr":
|
|
|
|
|
{
|
2018-03-12 18:15:30 +01:00
|
|
|
|
"access-token": "1234567890-abcdef",
|
|
|
|
|
"access-token-secret": "1234567890abcdef",
|
|
|
|
|
"size-max": 1920
|
2018-03-05 18:37:21 +01:00
|
|
|
|
},
|
2018-03-12 18:15:30 +01:00
|
|
|
|
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"mangadex":
|
|
|
|
|
{
|
|
|
|
|
"#": "only download safe/suggestive chapters translated to English",
|
|
|
|
|
"lang": "en",
|
|
|
|
|
"ratings": ["safe", "suggestive"],
|
|
|
|
|
|
|
|
|
|
"#": "put chapters into '.cbz' archives",
|
|
|
|
|
"postprocessors": ["cbz"]
|
|
|
|
|
},
|
|
|
|
|
|
2018-03-12 18:15:30 +01:00
|
|
|
|
"reddit":
|
2018-03-05 18:37:21 +01:00
|
|
|
|
{
|
2021-10-16 20:50:39 +02:00
|
|
|
|
"#": "only spawn child extractors for links to specific sites",
|
2023-09-04 18:27:11 +02:00
|
|
|
|
"whitelist": ["imgur", "redgifs"],
|
2021-10-16 20:50:39 +02:00
|
|
|
|
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"#": "put files from child extractors into the reddit directory",
|
|
|
|
|
"parent-directory": true,
|
|
|
|
|
|
|
|
|
|
"#": "transfer metadata to any child extractor as '_reddit'",
|
2021-10-16 20:50:39 +02:00
|
|
|
|
"parent-metadata": "_reddit"
|
2018-03-05 18:37:21 +01:00
|
|
|
|
},
|
2018-03-12 18:15:30 +01:00
|
|
|
|
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"imgur":
|
2018-03-05 18:37:21 +01:00
|
|
|
|
{
|
2024-01-02 15:03:04 +01:00
|
|
|
|
"#": "general imgur settings",
|
|
|
|
|
"filename": "{id}.{extension}"
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"reddit>imgur":
|
|
|
|
|
{
|
|
|
|
|
"#": "special settings for imgur URLs found in reddit posts",
|
|
|
|
|
"directory": [],
|
|
|
|
|
"filename": "{_reddit[id]} {_reddit[title]} {id}.{extension}"
|
2018-03-05 18:37:21 +01:00
|
|
|
|
},
|
2018-03-12 18:15:30 +01:00
|
|
|
|
|
2018-03-05 18:37:21 +01:00
|
|
|
|
"tumblr":
|
|
|
|
|
{
|
2021-10-16 20:50:39 +02:00
|
|
|
|
"posts" : "all",
|
2018-03-12 18:15:30 +01:00
|
|
|
|
"external": false,
|
2021-10-16 20:50:39 +02:00
|
|
|
|
"reblogs" : false,
|
|
|
|
|
"inline" : true,
|
2018-03-12 18:15:30 +01:00
|
|
|
|
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"#": "use special settings when downloading liked posts",
|
2018-03-12 18:15:30 +01:00
|
|
|
|
"likes":
|
|
|
|
|
{
|
2021-10-16 20:50:39 +02:00
|
|
|
|
"posts" : "video,photo,link",
|
2018-03-12 18:15:30 +01:00
|
|
|
|
"external": true,
|
2021-10-16 20:50:39 +02:00
|
|
|
|
"reblogs" : true
|
2018-03-12 18:15:30 +01:00
|
|
|
|
}
|
2019-02-05 16:17:25 +01:00
|
|
|
|
},
|
|
|
|
|
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"twitter":
|
|
|
|
|
{
|
|
|
|
|
"#": "write text content for *all* tweets",
|
|
|
|
|
"postprocessors": ["content"],
|
|
|
|
|
"text-tweets": true
|
|
|
|
|
},
|
|
|
|
|
|
2022-11-09 22:17:08 +01:00
|
|
|
|
"ytdl":
|
|
|
|
|
{
|
|
|
|
|
"#": "enable 'ytdl' extractor",
|
|
|
|
|
"#": "i.e. invoke ytdl on all otherwise unsupported input URLs",
|
|
|
|
|
"enabled": true,
|
|
|
|
|
|
|
|
|
|
"#": "use yt-dlp instead of youtube-dl",
|
|
|
|
|
"module": "yt_dlp",
|
|
|
|
|
|
|
|
|
|
"#": "load ytdl options from config file",
|
|
|
|
|
"config-file": "~/yt-dlp.conf"
|
|
|
|
|
},
|
|
|
|
|
|
2019-02-05 16:17:25 +01:00
|
|
|
|
"mastodon":
|
|
|
|
|
{
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"#": "add 'tabletop.social' as recognized mastodon instance",
|
|
|
|
|
"#": "(run 'gallery-dl oauth:mastodon:tabletop.social to get an access token')",
|
|
|
|
|
"tabletop.social":
|
2019-02-05 16:17:25 +01:00
|
|
|
|
{
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"root": "https://tabletop.social",
|
2019-02-05 16:17:25 +01:00
|
|
|
|
"access-token": "513a36c6..."
|
|
|
|
|
},
|
|
|
|
|
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"#": "set filename format strings for all 'mastodon' instances",
|
2019-02-05 16:17:25 +01:00
|
|
|
|
"directory": ["mastodon", "{instance}", "{account[username]!l}"],
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"filename" : "{id}_{media[id]}.{extension}"
|
2019-02-05 16:17:25 +01:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"foolslide": {
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"#": "add two more foolslide instances",
|
|
|
|
|
"otscans" : {"root": "https://otscans.com/foolslide"},
|
2019-02-05 16:17:25 +01:00
|
|
|
|
"helvetica": {"root": "https://helveticascans.com/r" }
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"foolfuuka": {
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"#": "add two other foolfuuka 4chan archives",
|
2019-02-05 16:17:25 +01:00
|
|
|
|
"fireden-onion": {"root": "http://ydt6jy2ng3s3xg2e.onion"},
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"scalearchive" : {"root": "https://archive.scaled.team" }
|
2022-02-04 23:38:22 +01:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"gelbooru_v01":
|
|
|
|
|
{
|
|
|
|
|
"#": "add a custom gelbooru_v01 instance",
|
|
|
|
|
"#": "this is just an example, this specific instance is already included!",
|
|
|
|
|
"allgirlbooru": {"root": "https://allgirl.booru.org"},
|
|
|
|
|
|
|
|
|
|
"#": "the following options are used for all gelbooru_v01 instances",
|
|
|
|
|
"tag":
|
|
|
|
|
{
|
|
|
|
|
"directory": {
|
|
|
|
|
"locals().get('bkey')": ["Booru", "AllGirlBooru", "Tags", "{bkey}", "{ckey}", "{search_tags}"],
|
|
|
|
|
"" : ["Booru", "AllGirlBooru", "Tags", "_Unsorted", "{search_tags}"]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"post":
|
|
|
|
|
{
|
|
|
|
|
"directory": ["Booru", "AllGirlBooru", "Posts"]
|
|
|
|
|
},
|
|
|
|
|
"archive": "~/gallery-dl/custom-archive-file-for-gelbooru_v01_instances.db",
|
|
|
|
|
"filename": "{tags}_{id}_{md5}.{extension}",
|
|
|
|
|
"sleep-request": [0, 1.2]
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"gelbooru_v02":
|
|
|
|
|
{
|
|
|
|
|
"#": "add a custom gelbooru_v02 instance",
|
|
|
|
|
"#": "this is just an example, this specific instance is already included!",
|
|
|
|
|
"tbib":
|
|
|
|
|
{
|
|
|
|
|
"root": "https://tbib.org",
|
|
|
|
|
"#": "some sites have different domains for API access",
|
|
|
|
|
"#": "use the 'api_root' option in addition to the 'root' setting here"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"tbib": {
|
|
|
|
|
"#": "the following options are only used for TBIB",
|
|
|
|
|
"#": "gelbooru_v02 has four subcategories at the moment, use custom directory settings for all of these",
|
|
|
|
|
"tag":
|
|
|
|
|
{
|
|
|
|
|
"directory": {
|
|
|
|
|
"locals().get('bkey')": ["Other Boorus", "TBIB", "Tags", "{bkey}", "{ckey}", "{search_tags}"],
|
|
|
|
|
"" : ["Other Boorus", "TBIB", "Tags", "_Unsorted", "{search_tags}"]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"pool":
|
|
|
|
|
{
|
|
|
|
|
"directory": {
|
|
|
|
|
"locals().get('bkey')": ["Other Boorus", "TBIB", "Pools", "{bkey}", "{ckey}", "{pool}"],
|
|
|
|
|
"" : ["Other Boorus", "TBIB", "Pools", "_Unsorted", "{pool}"]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"favorite":
|
|
|
|
|
{
|
|
|
|
|
"directory": {
|
|
|
|
|
"locals().get('bkey')": ["Other Boorus", "TBIB", "Favorites", "{bkey}", "{ckey}", "{favorite_id}"],
|
|
|
|
|
"" : ["Other Boorus", "TBIB", "Favorites", "_Unsorted", "{favorite_id}"]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"post":
|
|
|
|
|
{
|
|
|
|
|
"directory": ["Other Boorus", "TBIB", "Posts"]
|
|
|
|
|
},
|
|
|
|
|
"archive": "~/gallery-dl/custom-archive-file-for-TBIB.db",
|
|
|
|
|
"filename": "{id}_{md5}.{extension}",
|
|
|
|
|
"sleep-request": [0, 1.2]
|
2023-03-29 07:36:43 +02:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"urlshortener": {
|
|
|
|
|
"tinyurl": {"root": "https://tinyurl.com"}
|
2018-03-05 18:37:21 +01:00
|
|
|
|
}
|
|
|
|
|
},
|
2018-03-12 18:15:30 +01:00
|
|
|
|
|
2018-03-22 10:01:50 +01:00
|
|
|
|
"downloader":
|
|
|
|
|
{
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"#": "restrict download speed to 1 MB/s",
|
2018-03-22 10:01:50 +01:00
|
|
|
|
"rate": "1M",
|
2021-10-15 19:00:04 +02:00
|
|
|
|
|
|
|
|
|
"#": "show download progress indicator after 2 seconds",
|
|
|
|
|
"progress": 2.0,
|
|
|
|
|
|
|
|
|
|
"#": "retry failed downloads up to 3 times",
|
2018-03-22 10:01:50 +01:00
|
|
|
|
"retries": 3,
|
2021-10-15 19:00:04 +02:00
|
|
|
|
|
|
|
|
|
"#": "consider a download 'failed' after 8 seconds of inactivity",
|
|
|
|
|
"timeout": 8.0,
|
|
|
|
|
|
|
|
|
|
"#": "write '.part' files into a special directory",
|
|
|
|
|
"part-directory": "/tmp/.download/",
|
|
|
|
|
|
|
|
|
|
"#": "do not update file modification times",
|
|
|
|
|
"mtime": false,
|
|
|
|
|
|
|
|
|
|
"ytdl":
|
|
|
|
|
{
|
|
|
|
|
"#": "use yt-dlp instead of youtube-dl",
|
|
|
|
|
"module": "yt_dlp"
|
|
|
|
|
}
|
2018-03-22 10:01:50 +01:00
|
|
|
|
},
|
|
|
|
|
|
2018-03-05 18:37:21 +01:00
|
|
|
|
"output":
|
|
|
|
|
{
|
implement logging options
Standard logging to stderr, logfiles, and unsupported URL files (which
are now handled through the logging module) can now be configured by
setting their respective option keys (log, logfile, unsupportedfile)
to a dict and specifying the following options;
- format:
format string for logging messages
available keys: see [1]
default: "[{name}][{levelname}] {message}"
- format-date:
format string for {asctime} fields in logging messages
available keys: see [2]
default: "%Y-%m-%d %H:%M:%S"
- level:
the lowercase levelname until which the logger should activate;
available levels are debug, info, warning, error, exception
default: "info"
- path:
path of the file to be written to
- mode:
'mode' argument when opening the specified file
can be either "w" to truncate the file or "a" to append to it (see [3])
If 'output.log', '.logfile', or '.unsupportedfile' is a string, it will
be interpreted, as it has been, as the filepath
(or as format string for .log)
[1] https://docs.python.org/3/library/logging.html#logrecord-attributes
[2] https://docs.python.org/3/library/time.html#time.strftime
[3] https://docs.python.org/3/library/functions.html#open
2018-05-01 17:54:52 +02:00
|
|
|
|
"log": {
|
2019-06-21 19:56:09 +02:00
|
|
|
|
"level": "info",
|
2021-10-15 19:00:04 +02:00
|
|
|
|
|
|
|
|
|
"#": "use different ANSI colors for each log level",
|
2019-06-21 19:56:09 +02:00
|
|
|
|
"format": {
|
|
|
|
|
"debug" : "\u001b[0;37m{name}: {message}\u001b[0m",
|
|
|
|
|
"info" : "\u001b[1;37m{name}: {message}\u001b[0m",
|
|
|
|
|
"warning": "\u001b[1;33m{name}: {message}\u001b[0m",
|
|
|
|
|
"error" : "\u001b[1;31m{name}: {message}\u001b[0m"
|
|
|
|
|
}
|
implement logging options
Standard logging to stderr, logfiles, and unsupported URL files (which
are now handled through the logging module) can now be configured by
setting their respective option keys (log, logfile, unsupportedfile)
to a dict and specifying the following options;
- format:
format string for logging messages
available keys: see [1]
default: "[{name}][{levelname}] {message}"
- format-date:
format string for {asctime} fields in logging messages
available keys: see [2]
default: "%Y-%m-%d %H:%M:%S"
- level:
the lowercase levelname until which the logger should activate;
available levels are debug, info, warning, error, exception
default: "info"
- path:
path of the file to be written to
- mode:
'mode' argument when opening the specified file
can be either "w" to truncate the file or "a" to append to it (see [3])
If 'output.log', '.logfile', or '.unsupportedfile' is a string, it will
be interpreted, as it has been, as the filepath
(or as format string for .log)
[1] https://docs.python.org/3/library/logging.html#logrecord-attributes
[2] https://docs.python.org/3/library/time.html#time.strftime
[3] https://docs.python.org/3/library/functions.html#open
2018-05-01 17:54:52 +02:00
|
|
|
|
},
|
2021-10-15 19:00:04 +02:00
|
|
|
|
|
|
|
|
|
"#": "shorten filenames to fit into one terminal line",
|
|
|
|
|
"#": "while also considering wider East-Asian characters",
|
|
|
|
|
"shorten": "eaw",
|
|
|
|
|
|
2022-05-29 19:15:25 +02:00
|
|
|
|
"#": "enable ANSI escape sequences on Windows",
|
|
|
|
|
"ansi": true,
|
|
|
|
|
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"#": "write logging messages to a separate file",
|
implement logging options
Standard logging to stderr, logfiles, and unsupported URL files (which
are now handled through the logging module) can now be configured by
setting their respective option keys (log, logfile, unsupportedfile)
to a dict and specifying the following options;
- format:
format string for logging messages
available keys: see [1]
default: "[{name}][{levelname}] {message}"
- format-date:
format string for {asctime} fields in logging messages
available keys: see [2]
default: "%Y-%m-%d %H:%M:%S"
- level:
the lowercase levelname until which the logger should activate;
available levels are debug, info, warning, error, exception
default: "info"
- path:
path of the file to be written to
- mode:
'mode' argument when opening the specified file
can be either "w" to truncate the file or "a" to append to it (see [3])
If 'output.log', '.logfile', or '.unsupportedfile' is a string, it will
be interpreted, as it has been, as the filepath
(or as format string for .log)
[1] https://docs.python.org/3/library/logging.html#logrecord-attributes
[2] https://docs.python.org/3/library/time.html#time.strftime
[3] https://docs.python.org/3/library/functions.html#open
2018-05-01 17:54:52 +02:00
|
|
|
|
"logfile": {
|
|
|
|
|
"path": "~/gallery-dl/log.txt",
|
|
|
|
|
"mode": "w",
|
|
|
|
|
"level": "debug"
|
|
|
|
|
},
|
2021-10-15 19:00:04 +02:00
|
|
|
|
|
|
|
|
|
"#": "write unrecognized URLs to a separate file",
|
implement logging options
Standard logging to stderr, logfiles, and unsupported URL files (which
are now handled through the logging module) can now be configured by
setting their respective option keys (log, logfile, unsupportedfile)
to a dict and specifying the following options;
- format:
format string for logging messages
available keys: see [1]
default: "[{name}][{levelname}] {message}"
- format-date:
format string for {asctime} fields in logging messages
available keys: see [2]
default: "%Y-%m-%d %H:%M:%S"
- level:
the lowercase levelname until which the logger should activate;
available levels are debug, info, warning, error, exception
default: "info"
- path:
path of the file to be written to
- mode:
'mode' argument when opening the specified file
can be either "w" to truncate the file or "a" to append to it (see [3])
If 'output.log', '.logfile', or '.unsupportedfile' is a string, it will
be interpreted, as it has been, as the filepath
(or as format string for .log)
[1] https://docs.python.org/3/library/logging.html#logrecord-attributes
[2] https://docs.python.org/3/library/time.html#time.strftime
[3] https://docs.python.org/3/library/functions.html#open
2018-05-01 17:54:52 +02:00
|
|
|
|
"unsupportedfile": {
|
|
|
|
|
"path": "~/gallery-dl/unsupported.txt",
|
|
|
|
|
"mode": "a",
|
|
|
|
|
"format": "{asctime} {message}",
|
|
|
|
|
"format-date": "%Y-%m-%d-%H-%M-%S"
|
|
|
|
|
}
|
2018-03-22 10:01:50 +01:00
|
|
|
|
},
|
|
|
|
|
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"postprocessor":
|
|
|
|
|
{
|
|
|
|
|
"#": "write 'content' metadata into separate files",
|
|
|
|
|
"content":
|
|
|
|
|
{
|
|
|
|
|
"name" : "metadata",
|
|
|
|
|
|
|
|
|
|
"#": "write data for every post instead of each individual file",
|
|
|
|
|
"event": "post",
|
|
|
|
|
"filename": "{post_id|tweet_id|id}.txt",
|
|
|
|
|
|
|
|
|
|
"#": "write only the values for 'content' or 'description'",
|
|
|
|
|
"mode" : "custom",
|
|
|
|
|
"format": "{content|description}\n"
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"#": "put files into a '.cbz' archive",
|
|
|
|
|
"cbz":
|
|
|
|
|
{
|
|
|
|
|
"name": "zip",
|
|
|
|
|
"extension": "cbz"
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"#": "various ugoira post processor configurations to create different file formats",
|
|
|
|
|
"ugoira-webm":
|
|
|
|
|
{
|
|
|
|
|
"name": "ugoira",
|
|
|
|
|
"extension": "webm",
|
|
|
|
|
"ffmpeg-args": ["-c:v", "libvpx-vp9", "-an", "-b:v", "0", "-crf", "30"],
|
|
|
|
|
"ffmpeg-twopass": true,
|
|
|
|
|
"ffmpeg-demuxer": "image2"
|
|
|
|
|
},
|
|
|
|
|
"ugoira-mp4":
|
|
|
|
|
{
|
|
|
|
|
"name": "ugoira",
|
|
|
|
|
"extension": "mp4",
|
|
|
|
|
"ffmpeg-args": ["-c:v", "libx264", "-an", "-b:v", "4M", "-preset", "veryslow"],
|
|
|
|
|
"ffmpeg-twopass": true,
|
|
|
|
|
"libx264-prevent-odd": true
|
|
|
|
|
},
|
|
|
|
|
"ugoira-gif":
|
|
|
|
|
{
|
|
|
|
|
"name": "ugoira",
|
|
|
|
|
"extension": "gif",
|
|
|
|
|
"ffmpeg-args": ["-filter_complex", "[0:v] split [a][b];[a] palettegen [p];[b][p] paletteuse"]
|
|
|
|
|
},
|
|
|
|
|
"ugoira-copy": {
|
|
|
|
|
"name": "ugoira",
|
|
|
|
|
"extension": "mkv",
|
|
|
|
|
"ffmpeg-args": ["-c", "copy"],
|
|
|
|
|
"libx264-prevent-odd": false,
|
|
|
|
|
"repeat-last-frame": false
|
|
|
|
|
}
|
2018-03-22 10:01:50 +01:00
|
|
|
|
},
|
|
|
|
|
|
2021-10-15 19:00:04 +02:00
|
|
|
|
"#": "use a custom cache file location",
|
|
|
|
|
"cache": {
|
|
|
|
|
"file": "~/gallery-dl/cache.sqlite3"
|
|
|
|
|
}
|
2018-03-05 18:37:21 +01:00
|
|
|
|
}
|