timeline.yaml 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559
  1. # ═══════════════════════════════════════════════════════════════
  2. # TrendRadar 时间线配置
  3. # Version: 1.2.0
  4. # ═══════════════════════════════════════════════════════════════
  5. #
  6. # 这个文件控制「什么时间做什么事」。
  7. #
  8. # 大多数人不需要编辑这个文件。
  9. # 只需在 config.yaml 中选择一个预设模板即可:
  10. #
  11. # schedule:
  12. # preset: "morning_evening" ← 改这里就行
  13. #
  14. #
  15. # 可视化配置编辑器地址: https://sansan0.github.io/TrendRadar/
  16. #
  17. #
  18. # ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
  19. # 📖 基本概念(帮助你理解后面的配置)
  20. # ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
  21. #
  22. #
  23. # 🔁 程序是怎么运行的?
  24. #
  25. # TrendRadar 不是一直在后台运行的,而是被「定时闹钟」周期性唤醒:
  26. #
  27. # GitHub Actions 用户 → 由 .github/workflows/crawler.yml 中的 cron 定时触发
  28. # 默认每小时运行一次(如每小时第 33 分钟)
  29. #
  30. # Docker 用户 → 由 docker/.env 中的 CRON_SCHEDULE 定时触发
  31. # 默认每 30 分钟运行一次
  32. #
  33. # 每次被唤醒后,程序按以下三个阶段依次执行:
  34. #
  35. # 1️⃣ 采集(collect)
  36. # 爬取各热榜平台 + RSS 订阅源的最新数据,存入数据库
  37. #
  38. # ⬇
  39. #
  40. # 2️⃣ 分析(analyze)
  41. # 调用 AI 大模型对采集到的新闻进行深度分析(可选,需配置 API Key)
  42. #
  43. # ⬇
  44. #
  45. # 3️⃣ 推送(push)
  46. # 将整理好的热点新闻 + AI 分析结果发送到你的通知渠道
  47. # (飞书、钉钉、Telegram、邮件等)
  48. #
  49. # 这三个阶段都可以独立开关。本文件的作用就是控制:
  50. # 「在什么时间段,开启/关闭哪些阶段」。
  51. #
  52. #
  53. # 🔌 config.yaml 总开关 与 timeline 时间段开关 的关系
  54. #
  55. # config.yaml 里有几个「总开关」,它们的优先级高于本文件:
  56. #
  57. # platforms.enabled: false → 永远不爬热榜(无论 timeline 怎么设置)
  58. # rss.enabled: false → 永远不爬 RSS(同上)
  59. # notification.enabled: false → 永远不推送(同上)
  60. # ai_analysis.enabled: false → 永远不分析(同上)
  61. #
  62. # 只有当总开关为 true 时,timeline 的时间段开关才会生效。
  63. # 换句话说:总开关决定「能不能做」,timeline 决定「什么时候做」。
  64. #
  65. #
  66. # ⏰ 什么是「时间段」和「静默期」?
  67. #
  68. # 你可以把一天想象成一条时间线,上面划分了若干个「时间段」。
  69. # 每个时间段有自己的行为开关(是否采集、是否分析、是否推送)。
  70. #
  71. # 而不在任何时间段内的时间,就叫「静默期」(走 default 默认配置)。
  72. # 静默期通常必须要采集,这样数据一直在积累,
  73. # 等到推送时,就能汇总出完整的报告。
  74. #
  75. #
  76. # 💡 静默期越长,积累的数据越丰富(排名变化轨迹、上榜/下榜时间等),
  77. # 最终提交给 AI 分析的上下文也越完整,分析质量更高。
  78. # 相比 MCP Server,该方案的全天数据能呈现更完整的热度趋势和变化脉络。
  79. #
  80. #
  81. # ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
  82. # 📋 预设模板一览(选一个就行)
  83. # ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
  84. #
  85. # 1️⃣ always_on 全天候,有新增就推(默认)
  86. # 2️⃣ morning_evening 全天推送 + 晚间汇总(推荐大多数人)
  87. # 3️⃣ office_hours 工作日三段式:到岗速览→午间热点→收工汇总
  88. # 4️⃣ night_owl 午后速览 + 深夜全天汇总
  89. # 5️⃣ custom 完全自定义(需要编辑本文件底部的 custom 段)
  90. #
  91. # 想自定义?两种方式:
  92. # 1. 直接翻到本文件底部的「自定义模式」部分
  93. # 2. 在下方 presets 里新增你自己的预设模板
  94. # (只要 key 不重复,然后在 config.yaml 里填你的模板名即可)
  95. #
  96. # ⚠️ 关于时间段设计的建议:
  97. # GitHub Actions: 建议定时任务间隔 ≥ 2 小时。由于系统触发存在随机延迟,间隔过短可能导致任务漏运行。
  98. # Docker 用户:cron 定时是准时的,无此限制,按需设置即可。
  99. #
  100. #
  101. # ═══════════════════════════════════════════════════════════════
  102. # ───────────────────────────────────────────────────────────────
  103. # 预设模板
  104. # ───────────────────────────────────────────────────────────────
  105. presets:
  106. # ───────────────────────────────────────────────────────────
  107. # 1️⃣ always_on - 全天候监控
  108. #
  109. # 最简单的模式:全天候采集 + 推送,有新增就通知你。
  110. # 不划分时间段,全天使用同一套配置。
  111. # 适合:重度用户、实时舆情监控
  112. #
  113. # 全天:推送 ✓ | AI分析 ✗ | 不限推送次数
  114. # ───────────────────────────────────────────────────────────
  115. always_on:
  116. name: "全天监控"
  117. description: "全天候监控,有新增立即推送。适合重度用户。"
  118. # 默认配置 ── 不在任何时间段内时,使用这组开关
  119. # 因为这个模式没有划分时间段,所以 default 就是全天的行为
  120. default:
  121. collect: true # 采集数据(爬取热榜 + RSS)
  122. analyze: false # 不做 AI 分析(节省 API 费用)
  123. ai_mode: "current" # AI 分析当前榜单
  124. push: true # 有新内容就推送
  125. report_mode: "incremental" # 只推送新增内容,避免重复
  126. once: # 限制每个时间段内只执行一次
  127. analyze: false # 不限制分析次数
  128. push: false # 不限制推送次数
  129. # 没有定义任何时间段,全天都走 default
  130. #
  131. # 语法提示:{} 是 YAML 的「空字典」写法,表示里面没有任何内容。
  132. # 等价于写成多行但什么都不填。后面的 [] 同理,表示「空列表」。
  133. periods: {}
  134. day_plans:
  135. all_day:
  136. periods: [] # 空列表 = 这天不启用任何时间段
  137. week_map:
  138. 1: "all_day" # 周一
  139. 2: "all_day" # 周二
  140. 3: "all_day" # 周三
  141. 4: "all_day" # 周四
  142. 5: "all_day" # 周五
  143. 6: "all_day" # 周六
  144. 7: "all_day" # 周日
  145. # ───────────────────────────────────────────────────────────
  146. # 2️⃣ morning_evening - 早晚汇总(推荐)
  147. #
  148. # 全天推送当前热点 + 晚间做一次当日全天汇总。
  149. # 适合:大多数人
  150. #
  151. # 默认(全天):推送 ✓ | AI分析 ✓ | 不限推送次数
  152. # 晚间汇总:推送 ✓ | AI分析 ✓ | 只推/分析一次
  153. # ───────────────────────────────────────────────────────────
  154. morning_evening:
  155. name: "早晚汇总"
  156. description: "全天推送 + 晚间当日汇总。适合大多数人。"
  157. # 默认配置 ── 不命中任何时间段时的行为
  158. default:
  159. collect: true # 始终采集
  160. analyze: true # AI 分析当前榜单
  161. ai_mode: "current" # AI 分析当前榜单
  162. push: true # 每次推送当前在榜热点
  163. report_mode: "current" # 当前在榜的新闻
  164. # frequency_file: "xxx.txt" # 关键词文件(可选,位于 config/custom/keyword/)
  165. # interests_file: "xxx.txt" # AI 兴趣文件(可选,位于 config/custom/ai/)
  166. # filter_method: "keyword" # 筛选策略(可选: keyword | ai,不填用全局 filter.method)
  167. once:
  168. analyze: false # 不限制分析次数
  169. push: false # 不限制推送次数
  170. # 时间段定义 ── 只有晚间汇总需要特殊处理
  171. periods:
  172. evening_summary:
  173. name: "晚间汇总"
  174. start: "20:00"
  175. end: "22:00"
  176. # frequency_file: "xxx.txt" # 关键词文件(可选,位于 config/custom/keyword/)
  177. # interests_file: "xxx.txt" # AI 兴趣文件(可选,位于 config/custom/ai/)
  178. # filter_method: "keyword" # 筛选策略(可选: keyword | ai,不填用全局 filter.method)
  179. analyze: true # 晚间做 AI 分析
  180. ai_mode: "daily" # AI 也汇总全天内容
  181. report_mode: "daily" # 切换为当日全部新闻汇总
  182. once:
  183. analyze: true # 窗口内只分析一次
  184. push: true # 窗口内只推送一次
  185. # 日计划 ── 把时间段组装成一天的安排
  186. day_plans:
  187. all_day:
  188. periods: ["evening_summary"]
  189. # 周映射 ── 每天用哪个日计划(1=周一 ... 7=周日)
  190. week_map:
  191. 1: "all_day"
  192. 2: "all_day"
  193. 3: "all_day"
  194. 4: "all_day"
  195. 5: "all_day"
  196. 6: "all_day"
  197. 7: "all_day"
  198. # ───────────────────────────────────────────────────────────
  199. # 3️⃣ office_hours - 办公时间推送
  200. #
  201. # 工作日三段式推送,周末增量自由推。
  202. # 适合:上班族、企业用户
  203. #
  204. # 默认(静默期):推送 ✗ | AI分析 ✗
  205. # 到岗速览:推送 ✓ | AI分析 ✓ | 只推一次
  206. # 午间热点:推送 ✓ | AI分析 ✗ | 只推一次
  207. # 收工汇总:推送 ✓ | AI分析 ✓ | 只推一次
  208. # 周末自由:推送 ✓ | AI分析 ✗ | 不限推送次数
  209. # ───────────────────────────────────────────────────────────
  210. office_hours:
  211. name: "办公时间"
  212. description: "工作日三段式推送(到岗→午间→收工),周末增量自由推送。"
  213. default:
  214. collect: true
  215. analyze: false
  216. ai_mode: "current"
  217. push: false # 默认不推送
  218. report_mode: "current"
  219. once:
  220. analyze: true # 每个时段只分析一次
  221. push: true # 每个时段只推送一次
  222. periods:
  223. morning_briefing:
  224. name: "到岗速览"
  225. start: "09:00"
  226. end: "11:00"
  227. analyze: true # AI 分析当前热点
  228. ai_mode: "current" # AI 分析当前榜单
  229. push: true # 到岗后看当前热点
  230. report_mode: "current" # 当前在榜的新闻
  231. # once 继承 default(analyze: true, push: true)→ 只推/分析一次
  232. noon_update:
  233. name: "午间热点"
  234. start: "13:00"
  235. end: "15:00"
  236. push: true # 午间推送当前在榜热点
  237. report_mode: "current" # 当前在榜的新闻
  238. # analyze 继承 default: false → 午间不做 AI 分析,节省 API
  239. # once 继承 default(push: true)→ 只推一次
  240. closing_summary:
  241. name: "收工汇总"
  242. start: "17:00"
  243. end: "19:00"
  244. analyze: true # AI 做全天汇总分析
  245. ai_mode: "daily" # AI 也分析全天内容
  246. push: true # 下班前推送当日完整汇总
  247. report_mode: "daily" # 当日全部新闻汇总
  248. # once 继承 default(analyze: true, push: true)→ 只推/分析一次
  249. weekend_free:
  250. name: "周末自由"
  251. start: "08:00"
  252. end: "23:00"
  253. ai_mode: "current" # AI 分析当前榜单
  254. push: true # 有新增就推送
  255. report_mode: "incremental" # 增量模式:有新增才推,没有就安静
  256. once:
  257. analyze: false # 不限制分析次数
  258. push: false # 不限制推送次数
  259. # 工作日使用三段式推送;周末使用增量自由模式
  260. day_plans:
  261. workday:
  262. periods: ["morning_briefing", "noon_update", "closing_summary"]
  263. weekend:
  264. periods: ["weekend_free"] # 周末:有新增就推,不打扰睡眠
  265. week_map:
  266. 1: "workday" # 周一 → 工作日计划
  267. 2: "workday"
  268. 3: "workday"
  269. 4: "workday"
  270. 5: "workday"
  271. 6: "weekend" # 周六 → 周末计划
  272. 7: "weekend" # 周日 → 周末计划
  273. # ───────────────────────────────────────────────────────────
  274. # 4️⃣ night_owl - 夜猫子模式
  275. #
  276. # 白天安静,午后和深夜各推一次。
  277. # 适合:夜间工作者、海外时差用户、自由职业者
  278. #
  279. # 默认(白天静默):推送 ✗ | AI分析 ✗
  280. # 午后速览:推送 ✓ | AI分析 ✓ | 只推一次
  281. # 深夜汇总:推送 ✓ | AI分析 ✓ | 只推一次
  282. # ───────────────────────────────────────────────────────────
  283. night_owl:
  284. name: "夜猫子模式"
  285. description: "午后速览 + 深夜全天汇总。适合夜间工作者、海外时差用户。"
  286. default:
  287. collect: true
  288. analyze: false
  289. ai_mode: "current"
  290. push: false
  291. report_mode: "current"
  292. once:
  293. analyze: true # 每个时段只分析一次
  294. push: true # 每个时段只推送一次
  295. periods:
  296. afternoon_peek:
  297. name: "午后速览"
  298. start: "15:00"
  299. end: "17:00"
  300. analyze: true # AI 分析当前热点
  301. ai_mode: "current" # AI 分析当前榜单
  302. push: true # 午后看当前热点
  303. report_mode: "current" # 当前在榜的新闻
  304. # once 继承 default(analyze: true, push: true)→ 只推/分析一次
  305. late_night:
  306. name: "深夜汇总"
  307. start: "22:00"
  308. end: "01:00" # start > end → 自动识别为跨日
  309. analyze: true # AI 做全天汇总分析
  310. ai_mode: "daily" # AI 也分析全天内容
  311. push: true # 深夜推送当日完整汇总
  312. report_mode: "daily" # 当日全部新闻汇总
  313. # once 继承 default(analyze: true, push: true)→ 只推/分析一次
  314. day_plans:
  315. all_day:
  316. periods: ["afternoon_peek", "late_night"]
  317. week_map:
  318. 1: "all_day"
  319. 2: "all_day"
  320. 3: "all_day"
  321. 4: "all_day"
  322. 5: "all_day"
  323. 6: "all_day"
  324. 7: "all_day"
  325. # ═══════════════════════════════════════════════════════════════
  326. #
  327. # 5️⃣ 自定义模式
  328. #
  329. # 当 config.yaml 中设置 schedule.preset: "custom" 时,
  330. # 系统会读取下面这段配置。
  331. #
  332. # 如果上面的预设模板无法满足你的需求,可以在这里自由定义。
  333. #
  334. # ═══════════════════════════════════════════════════════════════
  335. #
  336. # 自定义配置的思路很简单,就像搭积木:
  337. #
  338. # 第 1 步:定义「积木块」(periods)
  339. # 每块积木 = 一个时间段 + 这段时间要做什么
  340. # 例如:早间 08-10 推送、晚间 19-21 汇总
  341. #
  342. # 第 2 步:拼成「一天的安排」(day_plans)
  343. # 把积木块组合起来,形成一天的日程
  344. # 例如:工作日用 [早间, 晚间],周末用 [晚间]
  345. #
  346. # 第 3 步:指定「每天用哪个安排」(week_map)
  347. # 周一到周日,分别对应哪个日计划
  348. # 例如:周一~周五用 workday,周六周日用 weekend
  349. #
  350. # 另外还有一个「默认配置」(default),
  351. # 当某个时刻不在任何积木块内时,就用默认配置。
  352. # 积木块里没写的字段,也会自动回退到默认配置。
  353. #
  354. #
  355. # 下面是一个完整的自定义示例,工作日和周末使用不同的时间段安排:
  356. #
  357. # 工作日时间段:
  358. # 深夜静默 23:00-06:00(跨日):采集 ✓ | 分析 ✓ | 推送 ✗
  359. # 工作日早间 08:00-10:00:推送 ✓ | incremental
  360. # 晚间汇总 19:00-21:00:推送 ✓ | 分析 ✓ | daily
  361. # 其余时间走默认配置(静默采集)
  362. #
  363. # 周末时间段:
  364. # 深夜静默 23:00-06:00(跨日):采集 ✓ | 分析 ✓ | 推送 ✗
  365. # 周末早间 10:00-12:00:推送 ✓ | daily
  366. # 晚间汇总 19:00-21:00:推送 ✓ | 分析 ✓ | daily
  367. # 其余时间走默认配置(静默采集)
  368. custom:
  369. name: "自定义"
  370. description: "完全自由定义时间段、日计划和周映射。"
  371. # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  372. # 默认配置
  373. #
  374. # 当前时刻不在任何时间段(积木块)内时,使用这组开关。
  375. # 时间段中没有写的字段,也会回退到这里。
  376. # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  377. default:
  378. collect: true # 是否采集数据(爬取热榜 + RSS)
  379. analyze: false # 是否执行 AI 分析
  380. ai_mode: "current" # AI 分析模式:
  381. # follow_report → 跟随 report_mode
  382. # daily → 强制全天汇总
  383. # current → 强制当前榜单
  384. # incremental → 强制增量模式
  385. push: false # 是否发送推送通知
  386. report_mode: "current" # 报告模式:
  387. # daily → 当日所有新闻的汇总
  388. # current → 当前在榜的新闻
  389. # incremental → 只推送新增内容
  390. # frequency_file: "general.txt"
  391. # 关键词文件(可选,位于 config/custom/keyword/)
  392. # 不填则使用默认的 config/frequency_words.txt
  393. # 时间段(period)中也可以设置此字段来覆盖默认值
  394. # 例如晚间汇总用科技词库:
  395. # frequency_file: "tech.txt"
  396. # 注意:仅在 filter_method 为 keyword 时生效
  397. # interests_file: "finance.txt"
  398. # AI 兴趣描述文件(可选,位于 config/custom/ai/)
  399. # 不填则使用默认的 config/ai_interests.txt
  400. # 时间段(period)中也可以设置此字段来覆盖默认值
  401. # 例如晚间汇总用金融兴趣:
  402. # interests_file: "finance.txt"
  403. # 注意:仅在 filter_method 为 ai 时生效
  404. # filter_method: "keyword" # 筛选策略(可选: keyword | ai)
  405. # 不填则使用全局 config.yaml 的 filter.method
  406. # 时间段(period)中也可以设置此字段来覆盖
  407. # 例如晚间汇总用 AI 筛选:
  408. # filter_method: "ai"
  409. once:
  410. analyze: true # 该时间段内只分析一次(省 API)
  411. push: true # 该时间段内只推送一次(省打扰)
  412. # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  413. # 第 1 步:定义积木块(时间段)
  414. #
  415. # 每个时间段有一个唯一的 key(如 deep_quiet),
  416. # 以及 start / end 表示生效的时间范围。
  417. #
  418. # 只需要写「和 default 不同的字段」,其余自动继承 default。
  419. # 例如 weekday_morning 没写 collect,就会继承 default 的 collect: true。
  420. #
  421. # 提示:如果 start > end(如 22:00 → 07:00),
  422. # 系统会自动识别为跨越午夜的时间段。
  423. # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  424. periods:
  425. deep_quiet:
  426. name: "深夜静默"
  427. start: "23:00"
  428. end: "06:00" # 23:00 → 次日 06:00(跨日时间段)
  429. # frequency_file: "xxx.txt" # 关键词文件(可选,位于 config/custom/keyword/)
  430. # interests_file: "xxx.txt" # AI 兴趣文件(可选,位于 config/custom/ai/)
  431. # filter_method: "keyword" # 筛选策略(可选: keyword | ai,不填用全局 filter.method)
  432. collect: true # 夜间继续采集数据
  433. analyze: true # 夜间可以跑 AI 分析(反正不推送)
  434. push: false # 深夜不推送,避免打扰
  435. weekday_morning:
  436. name: "工作日早间"
  437. start: "08:00"
  438. end: "10:00" # 跨度 2h,留足触发裕量
  439. # frequency_file: "xxx.txt" # 关键词文件(可选,位于 config/custom/keyword/)
  440. # interests_file: "xxx.txt" # AI 兴趣文件(可选,位于 config/custom/ai/)
  441. # filter_method: "keyword" # 筛选策略(可选: keyword | ai,不填用全局 filter.method)
  442. push: true # 早上推送一次
  443. report_mode: "incremental" # 只推新增内容
  444. # once 继承 default(push: true)→ 窗口内只推一次
  445. weekend_morning:
  446. name: "周末早间"
  447. start: "10:00"
  448. end: "12:00" # 跨度 2h
  449. # frequency_file: "xxx.txt" # 关键词文件(可选,位于 config/custom/keyword/)
  450. # interests_file: "xxx.txt" # AI 兴趣文件(可选,位于 config/custom/ai/)
  451. # filter_method: "keyword" # 筛选策略(可选: keyword | ai,不填用全局 filter.method)
  452. push: true
  453. report_mode: "daily" # 周末看全天汇总
  454. # once 继承 default(push: true)→ 窗口内只推一次
  455. evening_summary:
  456. name: "晚间汇总"
  457. start: "19:00"
  458. end: "21:00"
  459. # frequency_file: "xxx.txt" # 关键词文件(可选,位于 config/custom/keyword/)
  460. # interests_file: "xxx.txt" # AI 兴趣文件(可选,位于 config/custom/ai/)
  461. # filter_method: "keyword" # 筛选策略(可选: keyword | ai,不填用全局 filter.method)
  462. analyze: true # 晚间做 AI 分析
  463. ai_mode: "daily" # AI 也分析全天内容
  464. push: true # 晚间推送
  465. report_mode: "daily" # 当日全部新闻汇总
  466. # once 继承 default(analyze: true, push: true)→ 只分析/推送一次
  467. # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  468. # 第 2 步:把积木块拼成日计划
  469. #
  470. # 把上面定义的时间段组合成一天的安排。
  471. # 你可以定义多个日计划(如 workday 和 weekend),
  472. # 然后在第 3 步的 week_map 中分配给不同的星期。
  473. # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  474. day_plans:
  475. workday: # 工作日计划
  476. periods: ["deep_quiet", "weekday_morning", "evening_summary"]
  477. weekend: # 周末计划(用 weekend_morning 替换 weekday_morning)
  478. periods: ["deep_quiet", "weekend_morning", "evening_summary"]
  479. # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  480. # 第 3 步:指定每天用哪个日计划
  481. #
  482. # 1=周一 2=周二 3=周三 4=周四 5=周五 6=周六 7=周日
  483. # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  484. week_map:
  485. 1: "workday" # 周一 → 工作日计划
  486. 2: "workday" # 周二
  487. 3: "workday" # 周三
  488. 4: "workday" # 周四
  489. 5: "workday" # 周五
  490. 6: "weekend" # 周六 → 周末计划
  491. 7: "weekend" # 周日
  492. # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  493. # 冲突策略(一般不用改)
  494. #
  495. # 什么是「冲突」?
  496. # 如果你的两个时间段有重叠(比如 A 是 08:00-12:00,B 是 10:00-14:00),
  497. # 那么 10:00-12:00 这段时间就同时属于 A 和 B,产生了冲突。
  498. # 此时程序需要知道:到底听谁的?
  499. #
  500. # 两种处理方式:
  501. #
  502. # error_on_overlap(推荐)
  503. # 直接报错,提醒你去修改配置。
  504. # 适合大多数人 —— 时间段重叠通常是写错了,报错能及时发现。
  505. #
  506. # last_wins
  507. # day_plans 的 periods 列表中,写在后面的优先。
  508. # 比如 periods: ["A", "B"],重叠时 B 生效。
  509. # 适合场景:你想用一个大范围时间段打底,再用后面的小范围覆盖。
  510. #
  511. # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  512. overlap:
  513. policy: "error_on_overlap"