Repository navigation
Expand file tree
/
Copy pathapplication.example.yml
More file actions
406 lines (398 loc) · 20.9 KB
/
Copy pathapplication.example.yml
File metadata and controls
406 lines (398 loc) · 20.9 KB
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
# komf-rs 配置模板(默认值 + 注释)。
#
# 使用方法:复制为 application.yml 后按需修改:
# Linux/macOS: cp application.example.yml application.yml
# Windows: copy application.example.yml application.yml
# 也可用环境变量 KOMF_CONFIG_DIR 指定配置目录,或把配置文件路径作为第一个参数传给 komf-app。
# 未创建 application.yml 时,服务以内置默认配置启动(仅监听 8085,无 mediaserver 凭据)。
# 运行中通过 API `PATCH /api/config` 修改的配置会自动写回 application.yml(不存在则创建)。
#
# 以下所有值均为代码内置默认值(省略该字段时行为相同);注释说明含义。
# 敏感字段(Komga 账号密码/API Key、e-hentai/exhentai cookie 等)请勿提交到版本库。
komga:
baseUri: http://localhost:25600 # Komga 服务地址
komgaUser: admin@example.org # Komga 登录用户名(basic auth 用;配置了 apiKey 可留空)
komgaPassword: admin # Komga 登录密码(basic auth 用)
apiKey: '' # Komga API Key(推荐;Komga 管理后台生成,非空时优先于账号密码)
thumbnailSizeLimit: 1048575 # 缩略图字节数上限(超过则不下载)
eventListener:
enabled: false # SSE 事件监听(自动匹配新入库系列)
metadataLibraryFilter: [] # 仅监听这些库(空 = 全部)
metadataSeriesExcludeFilter: [] # 跳过这些系列
notificationsLibraryFilter: [] # 通知过滤的库
metadataUpdate:
default:
libraryType: MANGA # 库媒体类型:MANGA / NOVEL / COMIC / WEBTOON
aggregate: false # 多 provider 聚合(主 provider 之外再拉取并合并其余)
mergeTags: false # 聚合时合并 tags(并同时并入服务器系列/书籍已有 tags,避免被覆盖)
mergeGenres: false # 聚合时合并 genres(并同时并入服务器系列已有 genres,避免被覆盖)
bookCovers: false # 更新书籍封面(关闭时 provider 也不再下载书籍封面字节)
seriesCovers: false # 更新系列封面(关闭时 provider 也不再下载系列封面字节)
overrideExistingCovers: true # 已存在封面也覆盖
lockCovers: true # 封面写入后加锁
updateModes: [API] # 更新方式:API / COMIC_INFO / MYLAR_SERIES_JSON
overrideComicInfo: false # COMIC_INFO 模式覆盖 ComicInfo.xml
mylarCovers: false # MYLAR_SERIES_JSON 模式同时下载系列封面(cover.jpg / <zip 文件名>.cover.jpg)
mylarOutputDir: null # mylar 导出根目录(null=系列原目录;支持 ${configDir} 占位符=配置目录;
# 库根目录由应用内部从媒体服务器 API 自动获取,用于还原相对目录结构
postProcessing:
seriesTitle: false # 设置系列主标题
seriesTitleLanguage: en # 主标题语言(null = 不设置语言)
alternativeSeriesTitles: false # 写入备选标题
alternativeSeriesTitleLanguages: [en, ja, ja-ro] # 备选标题语言(BCP 47)
fallbackToAltTitle: false # 主标题缺失时回退备选标题
orderBooks: false # 按卷号排序书籍
readingDirectionValue: null # 强制阅读方向:LEFT_TO_RIGHT / RIGHT_TO_LEFT / VERTICAL / WEBTOON
languageValue: null # 强制语言(如 zh / en)
scoreTagName: null # 评分写入的标签名(如 "score:9" → scoreTagName 匹配 "score:")
originalPublisherTagName: null # 原出版社标签名
publisherTagNames: [] # 出版社标签映射(tagName + language)
alternateTitleLabels: # alternate titles 的 ROMAJI/NATIVE/LOCALIZED 标签本地化
romaji: null # None = 默认 "Romaji"(如 "罗马音")
native: null # None = 默认 "Native"(如 "原名")
localized: null # None = 默认 "Localized"(如 "别名")
linksSkipEnabled: true # 系列 links 含 provider 识别特征时跳过自动匹配
linksMatchEnabled: true # linksSkipEnabled=false 时直接用 links 拉元数据更新(跳过搜索)
searchTitleExtraction:
enabled: false # 括号式标题提取(对系列名生成额外搜索候选)
bracketRegex: null # 括号内容提取正则(如 "\[([^\[\]]+)\]")
authorSeparator: null # 默认 "×"(作者识别分隔符正则;null=清空)
titleSplitters: [] # 标题拆分符列表(支持正则,如 "_")
symbolNormalizeRegex: '[::•·․,,。\..''’??!!~⁓~-—]' # 符号归一正则(匹配部分替换为空格)
charMappings: [] # 单字符映射表(如 [["/","/"]],键支持正则)
cleanupRegex: [] # 整名清洗链(按序替换为空)
failedMatchCollectionName: null # Auto-Identify Library 匹配失败系列加入的收藏夹名(Rust 扩展)
chineseConversion: # 简繁转换(Rust 扩展)
enabled: false # 总开关
direction: t2s # t2s(繁→简)/ s2t(简→繁)
search: true # 应用于搜索关键词
matching: true # 应用于自动匹配(query 与候选双向)
update:
enabled: true # 应用于元数据更新
fields: [title] # 应用字段:title / genres / tags / summary
seriesMetadata: # Provider 系列元数据字段开关(默认全 true,score 默认 false)
status: true
title: true
titleSort: true
summary: true
publisher: true
readingDirection: true
ageRating: true
language: true
genres: true
tags: true
totalBookCount: true
authors: true
releaseDate: true
thumbnail: true
books: true
links: true
score: true
useOriginalPublisher: false
library: {} # 按库覆盖(komga/kavita 库 id → 同 default 结构)
stump: # Stump 媒体服务器(Rust 扩展)
baseUri: http://localhost:10801 # Stump 服务地址
username: '' # 登录用户名(apiKey 为空时用账号密码登录换取 JWT)
password: ''
apiKey: '' # Stump API Key(`stump_` 前缀;推荐,非空时优先于账号密码)
eventListener:
enabled: false # GraphQL WS 事件监听(readEvents 订阅)
metadataLibraryFilter: [] # 仅监听这些库(空 = 全部)
metadataSeriesExcludeFilter: [] # 跳过这些系列
notificationsLibraryFilter: [] # 通知过滤的库
metadataUpdate:
default:
libraryType: MANGA
aggregate: false
mergeTags: false
mergeGenres: false
bookCovers: false
seriesCovers: false
overrideExistingCovers: true
lockCovers: true
updateModes: [API]
overrideComicInfo: false
postProcessing:
seriesTitle: false
seriesTitleLanguage: en
alternativeSeriesTitles: false
alternativeSeriesTitleLanguages: [en, ja, ja-ro]
fallbackToAltTitle: false
orderBooks: false
readingDirectionValue: null
languageValue: null
scoreTagName: null
originalPublisherTagName: null
publisherTagNames: []
alternateTitleLabels:
romaji: null
native: null
localized: null
linksSkipEnabled: true
linksMatchEnabled: true
searchTitleExtraction:
enabled: false
bracketRegex: null
authorSeparator: null # 默认 "×"(null=清空)
titleSplitters: []
symbolNormalizeRegex: '[::•·․,,。\..''’??!!~⁓~-—]'
charMappings: []
cleanupRegex: []
failedMatchCollectionName: null
chineseConversion:
enabled: false
direction: t2s
search: true
matching: true
update:
enabled: true
fields: [title]
seriesMetadata: # Provider 系列元数据字段开关(默认全 true,score 默认 false)
status: true
title: true
titleSort: true
alternativeTitles: true # 是否写入 provider 提供的备选标题(主标题选定后的剩余部分);false=最终仅保留主标题(不影响匹配与主标题语言选择)
summary: true
publisher: true
readingDirection: true
ageRating: true
language: true
genres: true
tags: true
totalBookCount: true
authors: true
releaseDate: true
thumbnail: true
books: true
links: true
score: false
useOriginalPublisher: false
library: {}
kavita:
baseUri: http://localhost:5000 # Kavita 服务地址
apiKey: '' # Kavita API Key
eventListener:
enabled: false # SSE 事件监听
metadataLibraryFilter: []
metadataSeriesExcludeFilter: []
notificationsLibraryFilter: []
metadataUpdate:
default:
libraryType: MANGA
aggregate: false
mergeTags: false
mergeGenres: false
bookCovers: false
seriesCovers: false
overrideExistingCovers: true
lockCovers: true
updateModes: [API]
overrideComicInfo: false
postProcessing:
seriesTitle: false
seriesTitleLanguage: en
alternativeSeriesTitles: false
alternativeSeriesTitleLanguages: [en, ja, ja-ro]
fallbackToAltTitle: false
orderBooks: false
readingDirectionValue: null
languageValue: null
scoreTagName: null
originalPublisherTagName: null
publisherTagNames: []
alternateTitleLabels:
romaji: null
native: null
localized: null
linksSkipEnabled: true
linksMatchEnabled: true
searchTitleExtraction:
enabled: false
bracketRegex: null
authorSeparator: null # 默认 "×"(null=清空)
titleSplitters: []
symbolNormalizeRegex: '[::•·․,,。\..''’??!!~⁓~-—]'
charMappings: []
cleanupRegex: []
failedMatchCollectionName: null
chineseConversion:
enabled: false
direction: t2s
search: true
matching: true
update:
enabled: true
fields: [title]
seriesMetadata: # Provider 系列元数据字段开关(默认全 true,score 默认 false)
status: true
title: true
titleSort: true
alternativeTitles: true # 是否写入 provider 提供的备选标题(主标题选定后的剩余部分);false=最终仅保留主标题(不影响匹配与主标题语言选择)
summary: true
publisher: true
readingDirection: true
ageRating: true
language: true
genres: true
tags: true
totalBookCount: true
authors: true
releaseDate: true
thumbnail: true
books: true
links: true
score: false
useOriginalPublisher: false
library: {}
database:
file: ./database.sqlite # SQLite 数据库文件
metadataProviders:
malClientId: null # MAL API 客户端 ID(mal provider 必需)
comicVineApiKey: null # Comic Vine API Key(comicVine provider 必需)
comicVineSearchLimit: null # Comic Vine 搜索条数上限(默认 10)
comicVineIssueName: null # 刊名模板(如 "Issue #{number}")
comicVineIdFormat: null # ID 格式(如 "[cv-{id}]")
bangumiToken: null # Bangumi API token(可选,显示 NSFW 条目)
nameMatchingMode: CLOSEST_MATCH # EXACT / CONTAINS / CLOSEST_MATCH / DISTANCE
defaultProviders:
# 通用默认(未列出字段省略时):enabled=false、mediaType=MANGA、
# authorRoles=[WRITER]、artistRoles=[PENCILLER,INKER,COLORIST,LETTERER,COVER]、
# seriesMetadata 中 score/useOriginalPublisher/thumbnail 默认 false,其余全 true、
# bookMetadata 中 title/number/numberSort/thumbnail 默认 false,其余全 true、tagWhitelist=[]。
mangaUpdates:
priority: 10
enabled: true # 默认唯一启用的 provider(公开 API 无需凭据)
seriesMetadata: # 每字段开关(默认全 true;仅列差异时省略,score 默认 false)
status: true
title: true
alternativeTitles: true # 是否写入 provider 提供的备选标题(主标题选定后的剩余部分);false=最终仅保留主标题(不影响匹配与主标题语言选择)
titleSort: true
summary: true
publisher: true
readingDirection: true
ageRating: true
language: true
genres: true
tags: true
totalBookCount: true
authors: true
releaseDate: true
thumbnail: true
books: true
links: true
score: false
useOriginalPublisher: false
bookMetadata: # 每字段开关(title/number/numberSort/thumbnail 默认 false,其余默认 true)
title: true
summary: true
number: true
numberSort: true
releaseDate: true
authors: true
tags: true
isbn: true
links: true
thumbnail: true
mangaBaka:
priority: 10
enabled: false
mode: API # API / DATABASE
bookWalker:
priority: 10
enabled: false
mangaDex:
priority: 10
enabled: false
coverLanguages: [en, ja] # 封面语言偏好
aniList:
priority: 40
enabled: false
tagsScoreThreshold: 60 # 标签评分阈值(≥ 该值的标签才采用)
tagsSizeLimit: 15 # 标签数量上限
titleLanguagePriority: [] # 标题语言优先级(english/romaji/native,越靠前越优先);
# 非空时系列主标题/搜索显示/staff 姓名按该优先级取语言版本,
# 不再受登录态 userPreferred 限制;空(缺省)=登录后按账号
# userPreferred(staff 姓名:native→name.native,
# romaji/english→name.full)
mal:
priority: 20
enabled: false # 需 malClientId
comicVine:
priority: 110
enabled: false # 需 comicVineApiKey
yenPress:
priority: 50
enabled: false
viz:
priority: 70
enabled: false
bangumi:
priority: 100
enabled: false # 公开 API;可选 bangumiToken
mediaType: MANGA # 搜索显示与匹配过滤(库级覆盖优先)
tagWhitelist: [] # 追加到内置 154 项白名单(支持 "a,b" 字符串)
tagWhitelistFile: null # 白名单 json 路径;缺省内置 bangumi_tag_whitelist.json
archive: # bangumi/Archive 离线数据源(BangumiKomga bangumi_archive 移植)
enabled: false # 启用后后台下载 Archive(约 400+MB zip)→ SQLite 索引(FTS5)+ mmap
# 搜索/元数据离线优先(含别名相似度、单行本 relations);封面仍在线 API 取
# 未就绪 / 未命中 → 自动回退在线 API;可关闭本段恢复纯在线
dir: null # 数据目录(archive_index.db 等);缺省 workDir/bangumi-archive
updateIntervalHours: 168 # 更新检查间隔(小时);0 = 仅首次构建不检查更新
idleReleaseSecs: 60 # 页缓存空闲释放(秒):距上次释放超过该时长即
# PRAGMA shrink_memory 归还 SQLite 页缓存(对齐 ehentai
# archive);0 = 禁用(默认 60)
staffChineseNames: false # 作者/出版社中文名开关:true=离线 person 实体 name_cn 优先;
# false(缺省)=用日文原名。仅影响 authors/publisher 显示名
webtoons:
priority: 130
enabled: false
language: en # 语言站台:en / zh-hant(台湾,亦接受 zh-TW / zh_TW)/ th / id / es / fr / de
# 决定搜索站台与作品网址;搜索词需用该站台语言的书名。
# 写入的 metadata language / 标题语言 = 站台语言(zh-hant → zh-Hant),
# 即该译本的语言而非原作语言;作品网址自带语言时以网址为准。
# API PATCH 传 null 或省略 = 保持原值,恢复缺省需显式传 en
eHentai:
priority: 10
enabled: false # 需可访问 e-hentai.org(常需代理);exhentai 另需 cookie
mediaType: MANGA # 搜索显示与匹配过滤(库级覆盖优先)
gidOnlyMatch: false # 自动匹配仅 gid 匹配:true → 只做 gid 精准搜索,无 gid /
# gid 无结果都跳过(不回落普通相似度搜索);links 匹配不受影响
preferredLanguages: [en, ja] # 语言偏好(筛选结果)
titlePriority: jpn # "jpn"=日文标题优先(默认)/ "title"=英文标题优先
translatorKeywords: [] # 自定义汉化组关键词(空=内置 10 个)
maleOnlyTagsFile: null # male-only 标签 json 路径(缺省 workDir/ehentai/male_only_taglist.json 自动下载)
tagTranslationEnabled: false # EhTagTranslation 标签翻译(hentai-assistant 对齐):true 启用
# 应用内部统一接管更新:缓存 workDir/ehentai/db.text.json,每 24h 检查下载
tagTranslationUrl: null # 翻译库下载 URL(缺省官方 release db.text.json)
titleTemplate: '' # 元数据标题模板(空=不启用走 titlePriority)
# 示例: "{{title}}{% if translator %} [{{ translator }}]{% endif %}"
searchDomain: e-hentai # "e-hentai"(默认)| "exhentai"(仅搜索请求域名)
ipbMemberId: null # exhentai 登录 cookie(searchDomain=exhentai 时必需;403 自动刷新)
ipbPassHash: null
archive: # e-hentai-db 离线数据源(URenko nightly SQLite dump)
enabled: false # 启用后启动时下载 e-hentai.db.zstd(约 1+GB 压缩)→ 解压到本地
# gid 精准查询(getBookOrThrow / gid 匹配 / 链接搜索)离线优先
# 未就绪 / 未命中 → 自动回退在线 gdata;可关闭本段恢复纯在线
url: null # 数据库下载 URL(缺省 URenko nightly release e-hentai.db.zstd)
dbFile: null # 本地数据库文件路径(缺省 workDir/ehentai/e-hentai.db)
updateIntervalHours: 4 # 更新检查间隔(小时);0 = 仅启动时加载/下载一次,不自动更新
idleReleaseSecs: 60 # 空闲释放 SQLite 页面缓存(秒);0 = 禁用(默认 60)
searchCategoryFilter: [] # 离线标题搜索的 category 白名单(空=不过滤),
# 例: ["Doujinshi", "Manga", "Non-H"](FTS 命中后过滤候选)
searchUploaderFilter: [] # 离线标题搜索的 uploader 白名单(空=不过滤)
libraryProviders: {} # 按库覆盖(库 id → 同 defaultProviders 结构)
notifications:
templatesDirectory: ./ # 通知模板目录(velocity)
discord:
webhooks: null # Discord webhook URL 列表
embedColor: 1F8B4C # 嵌入消息颜色(十六进制)
seriesCover: false # 通知附带系列封面
apprise:
urls: null # Apprise URL 列表
seriesCover: false # 通知附带系列封面
server:
port: 8085 # HTTP 监听端口(修改需重启)
bind: 0.0.0.0 # HTTP 监听地址:0.0.0.0=所有网卡;仅本机访问填 127.0.0.1(修改需重启)。
# 服务本身无鉴权,对外暴露时务必用反向代理加鉴权(见 README 安全小节)
logLevel: INFO # 日志级别:TRACE / DEBUG / INFO / WARN / ERROR
httpLogLevel: BASIC # HTTP 请求日志级别:NONE / BASIC / HEADERS / BODY