-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
example.conf
421 lines (378 loc) · 13.5 KB
/
example.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
[downloader]
# URL of content to download
# You can specify multiple URLs by separating them with a comma.
# Alternatively, you can use a file to supply URLs. In this case, you would
# provide the path to the file here. The file should contain a list of the
# target URLs, each in its own line, along with any target-specific 'include'
# config. See project documentation for example.
target.url =
# Cookie to include in requests; required for accessing
# patron-only content
cookie =
# Whether to use status cache to quickly determine whether a target that had
# been downloaded before has changed since the last download.
#
# Note: if you modify or delete any downloaded file, status cache will be
# unaware of it!
#
# Default: 1
use.status.cache =
# Do not prompt for confirmation to proceed
# Default: 0
no.prompt =
# Run without writing files to disk (except logs, if any). Intended for
# testing / debugging.
# Default: 0
dry.run =
# Path to ffmpeg executable
# If not set, ffmpeg will be called directly when needed, so it should be
# in the PATH.
path.to.ffmpeg =
[output]
# Path to directory where content is saved
# Default: current working directory
out.dir =
# Name format of campaign directories. A format is a string pattern consisting
# of fields enclosed in curly braces.
#
# What is a campaign directory?
# -----------------------------
# When you download content, a directory is created for the campaign that hosts
# the content. Content directories, which stores the downloaded content, are
# then placed under the campaign directory.
#
# If campaign info could not be obtained from content, then content directory
# will be created directly under `out.dir`.
#
# A format must contain at least one of the following fields:
# `creator.vanity`
# `creator.name`
# 'creator.id'
# `campaign.name'
# 'campaign.id'
#
# Characters enclosed in square brackets followed by a question mark denote
# conditional separators. If the value of a field could not be obtained or
# is empty, the conditional separator immediately adjacent to it will be
# omitted from the name.
#
# Default: "{creator.vanity}[ - ]?{campaign.name}"
# Fallback: "campaign-{campaign.id}"
campaign.dir.name.format =
# Name format of content directories. A format is a string pattern consisting
# of fields enclosed in curly braces.
#
# What is a content directory?
# ----------------------------
# Content can be a post or product. A directory is created for each piece of
# content. Downloaded items for the content are placed under this directory.
#
# A format must contain at least one of the following unique identifier fields:
# `content.id`: ID of content
# `content.slug`: last segment of the content URL.
#
# In addition, a format can contain the following fields:
# `content.name`: post title or product name
# `content.type`: type of content ('product' or 'post')
# `content.publishDate`: publish date (ISO UTC format)
#
# Characters enclosed in square brackets followed by a question mark denote
# conditional separators. If the value of a field could not be obtained or
# is empty, the conditional separator immediately adjacent to it will be
# omitted from the name.
#
# Default: "{content.id}[ - ]?{content.name}"
# Fallback: "{content.type}-{content.id}"
content.dir.name.format =
# Filename format of a downloaded item. A format is a string pattern consisting
# of fields enclosed in curly braces.
#
# A format must contain at least one of the following fields:
# `media.id`: ID of the item downloaded (assigned by Patreon)
# `media.filename`: can be one of the following, in order of availability:
# - original filename included in the item's API data; or
# - filename derived from the header of the response to the HTTP
# download request.
#
# In addition, a format can contain the following fields:
# `media.type`: type of item (e.g. 'image' or 'video')
# `media.variant`: where applicable, the variant of the item (e.g. 'original',
# 'thumbnailSmall'...for images)
#
# If `media.variant` is not included in the format, it will be appended to it
# if `[include] -> all.media.variants` is set to '1'.
#
# Sometimes `media.filename` could not be obtained, in which case it will
# be replaced with `media.id`, unless it is already present in the format.
#
# Characters enclosed in square brackets followed by a question mark denote
# conditional separators. If the value of a field could not be obtained or
# is empty, the conditional separator immediately adjacent to it will be
# omitted from the name.
#
# Default: "{media.filename}"
# Fallback: "{media.type}-{media.id}"
media.filename.format =
# In the context of downloading content, the action to take when a file
# belonging to the content already exists.
#
# Supported values:
# - "overwrite": overwrite existing file
# - "skip": skip saving the file
# - "saveAsCopy": save the file under incremented filename (e.g. "abc.jpg"
# becomes "abc (1).jpg")
# - "saveAsCopyIfNewer": like "saveAsCopy", but only do so if the contents
# have actually changed.
#
# Default: "skip"
content.file.exists.action =
# In the context of saving info (such as campaign or post info), the action
# to take when a file belonging to the info already exists.
#
# Supported values: same as for `content.file.exists.action`
#
# Default: "saveAsCopyIfNewer"
info.file.exists.action =
# API data is saved as part of info. Because it changes frequently, and usually
# used for debugging purpose only, you can set a different action when saving
# an API data file that already exists.
#
# Default: "overwrite"
info.api.file.exists.action =
# This section contains options controlling what to include in downloads.
# If you supply target URLs through a file, you can override options in this
# section with target-specific ones provided in the file.
[include]
# Whether to process locked content. Default: 1
locked.content =
# Tier critera. Posts that do not belong to the tiers comprising the criteria
# will not be downloaded.
#
# Value:
# - Tier ID, or comma-separated string of tier IDs; or
# - "any" (any tier)
#
# To see what tiers are available for a particular creator,
# including their IDs, call 'patreon-dl' with '--list-tiers'. E.g.:
# $ patreon-dl --list-tiers johndoe
# $ patreon-dl --list-tiers "johndoe, janedoe" // Multiple creators
#
# Some creators are identified only by their user ID, in which case you would
# use '--list-tiers-uid' instead:
# $ patreon-dl --list-tiers-uid "123456, 987654"
#
# Default: "any"
posts.in.tier =
# Media type criteria. Posts that do not meet the criteria will not be
# downloaded.
#
# General values:
# - "any": download regardless of media type (also applies to posts that
# do not contain any media)
# - "none": only download if post does not contain media
#
# Specific types:
# - "image": download if post contains image(s)
# - "video": download if post contains video
# - "audio": download if post contains audio
# - "attachment": download if post contains attachment(s)
#
# For specific types, you can set multiple values by separating them with a
# comma. E.g. "image, video, audio" will download posts containing any of these
# media types, but will ignore posts containing only attachments.
#
# Default: "any"
posts.with.media.type =
# Date criteria. Posts published outside the date criteria will not be
# downloaded. You can provide an 'after' or 'before' date, or both to
# indicate a date range.
#
# Date format: yyyy-MM-dd [hh:mm[:ss] [GMT]]
# (Square brackets denote optional components)
# - yyyy: year (4-digits)
# - MM: month (2-digits)
# - dd: day of month (2-digits)
# - hh: hour (2-digits, 24-hour format)
# - mm: minutes (2-digits)
# - ss: seconds (2-digits)
# - GMT: timezone (4-digits), e.g. +0800 (default: +0000)
#/^(\d{4})-(\d{2})-(\d{2})(?: (\d{2}):(\d{2})(?::(\d{2}))?(?: (\+\d{4}))?)?/gm
# Examples:
# - 2024-03-12 --> same as 2024-03-12 00:00:00 +0000
# - 2024-03-12 02:03 --> same as 2024-03-12 02:03:00 +0000
# - 2024-03-12 02:03:59 +0800
#
# Date comparison:
# - 'after': inclusive. E.g. 2024-03-12 -> posts published on this day and
# after will be downloaded.
# - 'before': exclusive. E.g. 2024-03-14 -> posts published on days up to
# (but not including) this date will be downloaded.
posts.published.after =
posts.published.before =
# Whether to save campaign info. Default: 1
campaign.info =
# Whether to save content info. Default: 1
content.info =
# The type of content media to download
# (images, videos, audio, attachments, excluding previews).
#
# General values:
# - 1: download all types of content media
# - 0: do not download content media
#
# Specific types:
# - "image" - download image(s)
# - "video" - download video
# - "audio" - download audio
# - "attachment" - download attachment(s)
# - "file" - download file (applies to products only)
#
# For specific types, you can set multiple values by separating them with a
# comma. E.g. "image, video" will download images and video, but skip audio and
# attachments.
#
# Default: 1
content.media =
# The type of preview media to download, if available.
#
# General values:
# - 1: download all types of preview media
# - 0: do not download preview media
#
# Specific types:
# - "image" - download image preview(s)
# - "video" - download video preview
# - "audio" - download audio preview
#
# For specific types, you can set multiple values by separating them with a
# comma. E.g. "image, video" will download image and video previews, but skip
# audio preview.
#
# Default: 1
preview.media =
# Whether to download all media variants, if available.
# If 0, only the best quality variant will be downloaded.
# Default: 0
all.media.variants =
# Filter media by filename pattern. Media that do not match the provided
# pattern will not be downloaded. Filtering is performed by the minimatch
# library (https://github.com/isaacs/minimatch) and supports glob patterns.
#
# Example:
# attachments.by.filename = *.zip <- download ZIP attachments only
# images.by.filename = *.{gif,jpg,jpeg} <- download JPEGs and GIFs only
images.by.filename =
audio.by.filename =
attachments.by.filename =
[request]
# Maximum number of retries if a request or download fails
# Default: 3
max.retries =
# Maximum number of concurrent downloads
# Default: 10
max.concurrent =
# Minimum time to wait between starting requests / downloads (milliseconds)
# Default: 333
min.time =
# External downloaders
# --------------------
# You can specify external downloaders for embedded videos.
# See 'example-embed.conf' on how to do this.
# Configures the console logger of patreon-dl CLI
[logger.console]
# Whether to enable this logger. Default: 1
enabled =
# Log levels are defined in the following order:
# - debug
# - info
# - warn
# - error
#
# Messages up to the specified level will be included in the logs
# Default: "info"
log.level =
# Whether to include the date-time of a message. Default: 1
include.date.time =
# Whether to include the level of a message. Default: 1
include.level =
# Whether to include the originator of a message (e.g. "ProductParser")
# Default: 1
include.originator =
# When logging errors, whether to include the error stack. Default: 0
include.error.stack =
# The string pattern used to format date-time when `include.date.time` is 1
#
# Date-time formatting is provided by:
# https://github.com/felixge/node-dateformat
#
# Refer to the README of that project for pattern rules.
#
# Default: "mmm dd HH:MM:ss"
date.time.format =
# Whether to colorize messages. If enabled, the terminal running
# patreon-dl CLI must support ANSI colors.
# Default: 1
color =
# File logging
# ------------
#
# Aside from printing logs to console, you can also log to one or more files.
# To do this, you define one or more file loggers.
#
# Each file logger has its own section with name starting with 'logger.file.<id>'.
# The value of <id> does not really matter but should be unique within the
# configuration file.
#
# Each file logger section has the same options as [logger.console], with two
# additional options for specifying the log file to generate:
# - `log.dir`
# - `log.filename`
#
[logger.file.1]
enabled =
# Path to directory of the log file
#
# The path can be a string pattern consisting of the following fields enclosed
# in curly braces:
# `out.dir`: same value specified for `out.dir` under [output] (or its default)
# `target.url.path`: the pathname of target URL, sanitized as necessary.
# `datetime.<date-time format>`: the date-time of logger creation. Follows the
# same pattern rules as `date.time.format`.
#
# Default: "{out.dir}/logs/{target.url.path}"
log.dir =
# Name of log file
#
# The path can be a string pattern consisting of the following fields enclosed
# in curly braces:
# `target.url.path`: the pathname of target URL, sanitized as necessary.
# `datetime.<date-time format>`: the date-time of logger creation. Follows the
# same pattern rules as `date.time.format`.
# `log.level`: value specified for `log.level` of this logger
#
# Default: "{datetime.yyyymmdd}-{log.level}.log"
log.filename =
# What to do if log file exists? One of the following values:
# "append": append logs to existing file
# "overwrite": overwrite the existing file
#
# Default: "append"
file.exists.action =
# Following options have the same meaning as the corresponding options
# for [logger.console]:
# Default: "info"
log.level =
# Default: 1
include.date.time =
# Default 1
include.level =
# Default 1
include.originator =
# Default 0
include.error.stack =
# Default: "mmm dd HH:MM:ss"
date.time.format =
# Default: 0
color =
# If enabled, only viewers supporting ANSI colors will be able to
# display the log files properly.