Debian Codegraph @

docs/gallery-dl-example.conf

raw
1 {
2 "extractor":
3 {
4 "base-directory": "~/gallery-dl/",
5
6 "#": "set global archive file for all extractors",
7 "archive": "~/gallery-dl/archive.sqlite3",
8 "archive-pragma": ["journal_mode=WAL", "synchronous=NORMAL"],
9
10 "#": "add two custom keywords into the metadata dictionary",
11 "#": "these can be used to further refine your output directories or filenames",
12 "keywords": {"bkey": "", "ckey": ""},
13 "#": "make sure that custom keywords are empty, i.e. they don't appear unless specified by the user",
14 "keywords-default": "",
15
16 "#": "replace invalid path characters with unicode alternatives",
17 "path-restrict": {
18 "\\": "⧹",
19 "/" : "⧸",
20 "|" : "│",
21 ":" : "꞉",
22 "*" : "∗",
23 "?" : "?",
24 "\"": "″",
25 "<" : "﹤",
26 ">" : "﹥"
27 },
28
29 "#": "write tags for several *booru sites",
30 "postprocessors": [
31 {
32 "name": "metadata",
33 "mode": "tags",
34 "whitelist": ["danbooru", "moebooru", "sankaku"]
35 }
36 ],
37
38 "pixiv":
39 {
40 "#": "override global archive path for pixiv",
41 "archive": "~/gallery-dl/archive-pixiv.sqlite3",
42
43 "#": "set custom directory and filename format strings for all pixiv downloads",
44 "filename": "{id}{num}.{extension}",
45 "directory": ["Pixiv", "Works", "{user[id]}"],
46 "refresh-token": "aBcDeFgHiJkLmNoPqRsTuVwXyZ01234567890-FedC9",
47
48 "#": "transform ugoira into lossless MKVs",
49 "ugoira": true,
50 "postprocessors": ["ugoira-copy"],
51
52 "#": "use special settings for favorites and bookmarks",
53 "favorite":
54 {
55 "directory": ["Pixiv", "Favorites", "{user[id]}"]
56 },
57 "bookmark":
58 {
59 "directory": ["Pixiv", "My Bookmarks"],
60 "refresh-token": "01234567890aBcDeFgHiJkLmNoPqRsTuVwXyZ-ZyxW1"
61 }
62 },
63
64 "danbooru":
65 {
66 "ugoira": true,
67 "postprocessors": ["ugoira-webm"]
68 },
69
70 "exhentai":
71 {
72 "#": "use cookies instead of logging in with username and password",
73 "cookies":
74 {
75 "ipb_member_id": "12345",
76 "ipb_pass_hash": "1234567890abcdef",
77 "igneous" : "123456789",
78 "hath_perks" : "m1.m2.m3.a-123456789a",
79 "sk" : "n4m34tv3574m2c4e22c35zgeehiw",
80 "sl" : "dm_2"
81 },
82
83 "#": "wait 2 to 4.8 seconds between HTTP requests",
84 "sleep-request": [2.0, 4.8],
85
86 "filename": "{num:>04}_{name}.{extension}",
87 "directory": ["{category!c}", "{title}"]
88 },
89
90 "sankaku":
91 {
92 "#": "authentication with cookies is not possible for sankaku",
93 "username": "user",
94 "password": "#secret#"
95 },
96
97 "furaffinity": {
98 "#": "authentication with username and password is not possible due to CAPTCHA",
99 "cookies": {
100 "a": "01234567-89ab-cdef-fedc-ba9876543210",
101 "b": "fedcba98-7654-3210-0123-456789abcdef"
102 },
103
104 "descriptions": "html",
105 "postprocessors": ["content"]
106 },
107
108 "deviantart":
109 {
110 "#": "download 'gallery' and 'scraps' images for user profile URLs",
111 "include": "gallery,scraps",
112
113 "#": "use custom API credentials to avoid 429 errors",
114 "client-id": "98765",
115 "client-secret": "0123456789abcdef0123456789abcdef",
116 "refresh-token": "0123456789abcdef0123456789abcdef01234567",
117
118 "#": "put description texts into a separate directory",
119 "metadata": true,
120 "postprocessors": [
121 {
122 "name": "metadata",
123 "mode": "custom",
124 "directory" : "Descriptions",
125 "content-format" : "{description}\n",
126 "extension-format": "descr.txt"
127 }
128 ]
129 },
130
131 "kemonoparty": {
132 "postprocessors": [
133 {
134 "name": "metadata",
135 "event": "post",
136 "filename": "{id} {title}.txt",
137
138 "#": "write text content and external URLs",
139 "mode": "custom",
140 "format": "{content}\n{embed[url]:?/\n/}",
141
142 "#": "onlx write file if there is an external link present",
143 "filter": "embed.get('url') or re.search(r'(?i)(gigafile|xgf|1drv|mediafire|mega|google|drive)', content)"
144 }
145 ]
146 },
147
148 "flickr":
149 {
150 "access-token": "1234567890-abcdef",
151 "access-token-secret": "1234567890abcdef",
152 "size-max": 1920
153 },
154
155 "mangadex":
156 {
157 "#": "only download safe/suggestive chapters translated to English",
158 "lang": "en",
159 "ratings": ["safe", "suggestive"],
160
161 "#": "put chapters into '.cbz' archives",
162 "postprocessors": ["cbz"]
163 },
164
165 "reddit":
166 {
167 "#": "only spawn child extractors for links to specific sites",
168 "whitelist": ["imgur", "redgifs"],
169
170 "#": "put files from child extractors into the reddit directory",
171 "parent-directory": true,
172
173 "#": "transfer metadata to any child extractor as '_reddit'",
174 "parent-metadata": "_reddit"
175 },
176
177 "imgur":
178 {
179 "#": "general imgur settings",
180 "filename": "{id}.{extension}"
181 },
182
183 "reddit>imgur":
184 {
185 "#": "special settings for imgur URLs found in reddit posts",
186 "directory": [],
187 "filename": "{_reddit[id]} {_reddit[title]} {id}.{extension}"
188 },
189
190 "tumblr":
191 {
192 "posts" : "all",
193 "external": false,
194 "reblogs" : false,
195 "inline" : true,
196
197 "#": "use special settings when downloading liked posts",
198 "likes":
199 {
200 "posts" : "video,photo,link",
201 "external": true,
202 "reblogs" : true
203 }
204 },
205
206 "twitter":
207 {
208 "#": "write text content for *all* tweets",
209 "postprocessors": ["content"],
210 "text-tweets": true
211 },
212
213 "ytdl":
214 {
215 "#": "enable 'ytdl' extractor",
216 "#": "i.e. invoke ytdl on all otherwise unsupported input URLs",
217 "enabled": true,
218
219 "#": "use yt-dlp instead of youtube-dl",
220 "module": "yt_dlp",
221
222 "#": "load ytdl options from config file",
223 "config-file": "~/yt-dlp.conf"
224 },
225
226 "mastodon":
227 {
228 "#": "add 'tabletop.social' as recognized mastodon instance",
229 "#": "(run 'gallery-dl oauth:mastodon:tabletop.social to get an access token')",
230 "tabletop.social":
231 {
232 "root": "https://tabletop.social",
233 "access-token": "513a36c6..."
234 },
235
236 "#": "set filename format strings for all 'mastodon' instances",
237 "directory": ["mastodon", "{instance}", "{account[username]!l}"],
238 "filename" : "{id}_{media[id]}.{extension}"
239 },
240
241 "foolslide": {
242 "#": "add two more foolslide instances",
243 "otscans" : {"root": "https://otscans.com/foolslide"},
244 "helvetica": {"root": "https://helveticascans.com/r" }
245 },
246
247 "foolfuuka": {
248 "#": "add two other foolfuuka 4chan archives",
249 "fireden-onion": {"root": "http://ydt6jy2ng3s3xg2e.onion"},
250 "scalearchive" : {"root": "https://archive.scaled.team" }
251 },
252
253 "gelbooru_v01":
254 {
255 "#": "add a custom gelbooru_v01 instance",
256 "#": "this is just an example, this specific instance is already included!",
257 "allgirlbooru": {"root": "https://allgirl.booru.org"},
258
259 "#": "the following options are used for all gelbooru_v01 instances",
260 "tag":
261 {
262 "directory": {
263 "locals().get('bkey')": ["Booru", "AllGirlBooru", "Tags", "{bkey}", "{ckey}", "{search_tags}"],
264 "" : ["Booru", "AllGirlBooru", "Tags", "_Unsorted", "{search_tags}"]
265 }
266 },
267 "post":
268 {
269 "directory": ["Booru", "AllGirlBooru", "Posts"]
270 },
271 "archive": "~/gallery-dl/custom-archive-file-for-gelbooru_v01_instances.db",
272 "filename": "{tags}_{id}_{md5}.{extension}",
273 "sleep-request": [0, 1.2]
274 },
275
276 "gelbooru_v02":
277 {
278 "#": "add a custom gelbooru_v02 instance",
279 "#": "this is just an example, this specific instance is already included!",
280 "tbib":
281 {
282 "root": "https://tbib.org",
283 "#": "some sites have different domains for API access",
284 "#": "use the 'api_root' option in addition to the 'root' setting here"
285 }
286 },
287
288 "tbib": {
289 "#": "the following options are only used for TBIB",
290 "#": "gelbooru_v02 has four subcategories at the moment, use custom directory settings for all of these",
291 "tag":
292 {
293 "directory": {
294 "locals().get('bkey')": ["Other Boorus", "TBIB", "Tags", "{bkey}", "{ckey}", "{search_tags}"],
295 "" : ["Other Boorus", "TBIB", "Tags", "_Unsorted", "{search_tags}"]
296 }
297 },
298 "pool":
299 {
300 "directory": {
301 "locals().get('bkey')": ["Other Boorus", "TBIB", "Pools", "{bkey}", "{ckey}", "{pool}"],
302 "" : ["Other Boorus", "TBIB", "Pools", "_Unsorted", "{pool}"]
303 }
304 },
305 "favorite":
306 {
307 "directory": {
308 "locals().get('bkey')": ["Other Boorus", "TBIB", "Favorites", "{bkey}", "{ckey}", "{favorite_id}"],
309 "" : ["Other Boorus", "TBIB", "Favorites", "_Unsorted", "{favorite_id}"]
310 }
311 },
312 "post":
313 {
314 "directory": ["Other Boorus", "TBIB", "Posts"]
315 },
316 "archive": "~/gallery-dl/custom-archive-file-for-TBIB.db",
317 "filename": "{id}_{md5}.{extension}",
318 "sleep-request": [0, 1.2]
319 },
320
321 "urlshortener": {
322 "tinyurl": {"root": "https://tinyurl.com"}
323 }
324 },
325
326 "downloader":
327 {
328 "#": "restrict download speed to 1 MB/s",
329 "rate": "1M",
330
331 "#": "show download progress indicator after 2 seconds",
332 "progress": 2.0,
333
334 "#": "retry failed downloads up to 3 times",
335 "retries": 3,
336
337 "#": "consider a download 'failed' after 8 seconds of inactivity",
338 "timeout": 8.0,
339
340 "#": "write '.part' files into a special directory",
341 "part-directory": "/tmp/.download/",
342
343 "#": "do not update file modification times",
344 "mtime": false,
345
346 "ytdl":
347 {
348 "#": "use yt-dlp instead of youtube-dl",
349 "module": "yt_dlp"
350 }
351 },
352
353 "output":
354 {
355 "log": {
356 "level": "info",
357
358 "#": "use different ANSI colors for each log level",
359 "format": {
360 "debug" : "\u001b[0;37m{name}: {message}\u001b[0m",
361 "info" : "\u001b[1;37m{name}: {message}\u001b[0m",
362 "warning": "\u001b[1;33m{name}: {message}\u001b[0m",
363 "error" : "\u001b[1;31m{name}: {message}\u001b[0m"
364 }
365 },
366
367 "#": "shorten filenames to fit into one terminal line",
368 "#": "while also considering wider East-Asian characters",
369 "shorten": "eaw",
370
371 "#": "enable ANSI escape sequences on Windows",
372 "ansi": true,
373
374 "#": "write logging messages to a separate file",
375 "logfile": {
376 "path": "~/gallery-dl/log.txt",
377 "mode": "w",
378 "level": "debug"
379 },
380
381 "#": "write unrecognized URLs to a separate file",
382 "unsupportedfile": {
383 "path": "~/gallery-dl/unsupported.txt",
384 "mode": "a",
385 "format": "{asctime} {message}",
386 "format-date": "%Y-%m-%d-%H-%M-%S"
387 }
388 },
389
390 "postprocessor":
391 {
392 "#": "write 'content' metadata into separate files",
393 "content":
394 {
395 "name" : "metadata",
396
397 "#": "write data for every post instead of each individual file",
398 "event": "post",
399 "filename": "{post_id|tweet_id|id}.txt",
400
401 "#": "write only the values for 'content' or 'description'",
402 "mode" : "custom",
403 "format": "{content|description}\n"
404 },
405
406 "#": "put files into a '.cbz' archive",
407 "cbz":
408 {
409 "name": "zip",
410 "extension": "cbz"
411 },
412
413 "#": "various ugoira post processor configurations to create different file formats",
414 "ugoira-webm":
415 {
416 "name": "ugoira",
417 "extension": "webm",
418 "ffmpeg-args": ["-c:v", "libvpx-vp9", "-an", "-b:v", "0", "-crf", "30"],
419 "ffmpeg-twopass": true,
420 "ffmpeg-demuxer": "image2"
421 },
422 "ugoira-mp4":
423 {
424 "name": "ugoira",
425 "extension": "mp4",
426 "ffmpeg-args": ["-c:v", "libx264", "-an", "-b:v", "4M", "-preset", "veryslow"],
427 "ffmpeg-twopass": true,
428 "libx264-prevent-odd": true
429 },
430 "ugoira-gif":
431 {
432 "name": "ugoira",
433 "extension": "gif",
434 "ffmpeg-args": ["-filter_complex", "[0:v] split [a][b];[a] palettegen [p];[b][p] paletteuse"]
435 },
436 "ugoira-copy": {
437 "name": "ugoira",
438 "extension": "mkv",
439 "ffmpeg-args": ["-c", "copy"],
440 "libx264-prevent-odd": false,
441 "repeat-last-frame": false
442 }
443 },
444
445 "#": "use a custom cache file location",
446 "cache": {
447 "file": "~/gallery-dl/cache.sqlite3"
448 }
449 }