feat: 檔案名稱模板支援 ULID 和資料夾路徑 (#146 @lekoOwO)

* feat: Enhance HTML report generation and dispatching with captions

* chore: apply ruff fixes

* fix(ReportGenerator): update HTML caption for report generation

* fix(ReportGenerator): encode filename in HTML report caption URL

* fix(ReportGenerator): refactor golden quotes handling for clarity and consistency

* feat(ReportGenerator): enhance filename formatting with ulid support and path sanitization

* fix(ReportGenerator): enhance path validation and filename uniqueness in report generation

* fix: pylance type error and ruff

* fix: 路径默认使用 ulid 变量

---------

Co-authored-by: SXP-Simon <sxp20061207@163.com>
This commit is contained in:
leko
2026-04-01 20:38:57 +08:00
committed by GitHub
co-authored by SXP-Simon
parent 1fa1ebe5ca
commit 8ba5f69788
6 changed files with 225 additions and 45 deletions
+4 -4
View File
@@ -356,8 +356,8 @@
"pdf_filename_format": {
"type": "string",
"description": "PDF文件名格式",
"default": "群聊分析报告_{group_id}_{date}.pdf",
"hint": "PDF文件名格式,支持变量:{group_id}(群号)、{date}(日期)"
"default": "群聊分析报告_{group_id}_{date}_{ulid}.pdf",
"hint": "PDF文件名格式,支持变量:{group_id}(群号)、{date}(日期)、{ulid}(时间排序ID),支持子目录/层级。"
}
}
},
@@ -381,8 +381,8 @@
"html_filename_format": {
"type": "string",
"description": "HTML文件名格式",
"default": "群聊分析报告_{group_id}_{date}.html",
"hint": "HTML文件名格式,支持变量:{group_id}(群号)、{date}(日期)"
"default": "群聊分析报告_{group_id}_{date}_{ulid}.html",
"hint": "HTML文件名格式,支持变量:{group_id}(群号)、{date}(日期)、{ulid}(时间排序ID),支持子目录/层级。"
}
}
},