default.yaml 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. # Pipeline default configuration
  2. #
  3. # Priority: CLI flags > this file > .env (for secrets/endpoints)
  4. branding:
  5. channelName: "知势·科技洞察"
  6. llm:
  7. # baseURL: set via OPENAI_BASE_URL in .env
  8. # apiKey: set via OPENAI_API_KEY in .env
  9. model: "model-stable"
  10. tts:
  11. provider: "openai-tts"
  12. speed: 1.0
  13. format: "mp3"
  14. # alignment:
  15. # provider: "whisper"
  16. # whisperModel: "base"
  17. # language: "zh"
  18. openai-tts:
  19. # apiKey: set via OPENAI_TTS_API_KEY in .env
  20. # baseURL: set via OPENAI_TTS_BASE_URL in .env
  21. model: "seed-tts-1.1"
  22. defaultVoice: "zh_female_vv_uranus_bigtts"
  23. fish-audio:
  24. # apiKey: set via FISH_AUDIO_API_KEY in .env
  25. model: "s2-pro"
  26. defaultVoice: ""
  27. minimax:
  28. # apiKey: set via MINIMAX_API_KEY in .env
  29. # groupId: set via MINIMAX_GROUP_ID in .env
  30. model: "speech-02-hd"
  31. defaultVoice: ""
  32. elevenlabs:
  33. # apiKey: set via ELEVENLABS_API_KEY in .env
  34. model: "eleven_multilingual_v2"
  35. defaultVoice: "21m00Tcm4TlvDq8ikWAM"
  36. render:
  37. fps: 30
  38. codec: "h264"
  39. output:
  40. dir: "./output"
  41. format: "mp4"
  42. # Auto-clean cached outputs older than this many days (0 disables). Default 30.
  43. # Override with the OUTPUT_RETENTION_DAYS env var.
  44. retentionDays: 30
  45. # 每日推荐的"已讲历史"去重状态(covered store,@pipeline/shared/node)。
  46. # coveredWindowDays — 滚动去重窗口(天):窗口内讲过的项目不再讲,过期释放。
  47. # 文件位置由 PIPELINE_COVERED_DIR 指定(默认系统临时目录,重启即丢——部署时
  48. # 必须指向持久卷,推荐 jobs 卷的 covered/ 子目录,见 docs/DEPLOYMENT.md)。
  49. state:
  50. coveredWindowDays: 90
  51. # Alibaba Cloud OSS — rendered videos are uploaded here and a resource URL is
  52. # returned. Non-sensitive values may live in this file; secrets (access keys)
  53. # belong in .env. Every field can be overridden by an OSS_* env var.
  54. oss:
  55. region: "oss-cn-hangzhou" # OSS_REGION
  56. bucket: "" # OSS_BUCKET
  57. accessKeyId: "" # OSS_ACCESS_KEY_ID (use .env)
  58. accessKeySecret: "" # OSS_ACCESS_KEY_SECRET (use .env)
  59. # endpoint: "" # custom endpoint, e.g. https://oss-cn-hangzhou.aliyuncs.com — OSS_ENDPOINT
  60. # path: "videos/" # object key prefix — OSS_PATH
  61. # publicDomain: "" # base URL for resource links (e.g. a CDN) — OSS_PUBLIC_DOMAIN
  62. # secure: true # use HTTPS — OSS_SECURE
  63. # Feishu (Lark) custom-bot webhook — push results / failures after each job.
  64. feishu:
  65. webhook: "" # FEISHU_WEBHOOK_URL (use .env)
  66. # secret: "" # signing secret — FEISHU_WEBHOOK_SECRET
  67. # Publish manifest — written as {video}.yaml next to each rendered MP4 with the
  68. # title/description/tags (LLM-produced for github-trending) plus the
  69. # platform-specific 分区/category defined here. Lookup: publishMeta[platform][template].
  70. # Only fill the combos you publish; missing combos just omit those keys.
  71. publishMeta:
  72. bilibili:
  73. github-trending:
  74. tid: 122 # 分区 id (122 = 科技→科普). Adjust to your target board.
  75. tags: ["GitHub", "开源", "热榜"]
  76. github-weekly:
  77. tid: 122
  78. tags: ["GitHub", "开源", "周榜"]
  79. github-daily-pick:
  80. tid: 122
  81. tags: ["GitHub", "开源", "推荐"]
  82. github-weekly-recap:
  83. tid: 122
  84. tags: ["GitHub", "开源", "周报"]
  85. douyin-long:
  86. github-trending:
  87. category: "科技"
  88. tags: ["GitHub", "开源"]
  89. github-weekly:
  90. category: "科技"
  91. tags: ["GitHub", "开源", "周榜"]
  92. github-daily-pick:
  93. category: "科技"
  94. tags: ["GitHub", "开源", "推荐"]
  95. github-weekly-recap:
  96. category: "科技"
  97. tags: ["GitHub", "开源", "周报"]
  98. douyin-short:
  99. github-trending:
  100. category: "科技"
  101. tags: ["GitHub", "开源"]
  102. github-weekly:
  103. category: "科技"
  104. tags: ["GitHub", "开源", "周榜"]
  105. github-daily-pick:
  106. category: "科技"
  107. tags: ["GitHub", "开源", "推荐"]
  108. github-weekly-recap:
  109. category: "科技"
  110. tags: ["GitHub", "开源", "周报"]
  111. templates:
  112. news:
  113. primaryColor: "#1a56db"
  114. accentColor: "#dc2626"
  115. knowledge:
  116. primaryColor: "#0d9488"
  117. accentColor: "#6b7280"
  118. opinion:
  119. primaryColor: "#ea580c"
  120. accentColor: "#374151"
  121. marketing:
  122. primaryColor: "#9333ea"
  123. accentColor: "#ec4899"
  124. github-trending:
  125. primaryColor: "#22c55e"
  126. accentColor: "#3b82f6"
  127. github-weekly:
  128. primaryColor: "#d97706"
  129. accentColor: "#1e3a5f"
  130. github-daily-pick:
  131. primaryColor: "#8b5cf6"
  132. accentColor: "#22d3ee"
  133. github-weekly-recap:
  134. primaryColor: "#0284c7"
  135. accentColor: "#b45309"
  136. collect:
  137. github-trending:
  138. url: "https://github.crawler.corp.shuidi.tech/api/trending"
  139. # Repo-detail endpoint used to fetch each top repo's README (per-repo
  140. # description grounding). Optional — without it, only trending metadata is used.
  141. repoUrl: "https://github.crawler.corp.shuidi.tech/api/repos/:owner/:repo"
  142. # Weekly board — same endpoints; the collector appends ?since=weekly.
  143. github-weekly:
  144. url: "https://github.crawler.corp.shuidi.tech/api/trending"
  145. repoUrl: "https://github.crawler.corp.shuidi.tech/api/repos/:owner/:repo"
  146. github-repo:
  147. url: "https://github.crawler.corp.shuidi.tech/api/repos/:owner/:repo"
  148. github-daily:
  149. trendingUrl: "https://github.crawler.corp.shuidi.tech/api/trending"
  150. repoUrl: "https://github.crawler.corp.shuidi.tech/api/repos/:owner/:repo"
  151. maxRepos: 5
  152. # 每日推荐选题:日/周/月三榜并集,筛掉窗口内已讲项目后按综合热度取第一
  153. # 周榜。windowDays 与 state.coveredWindowDays 保持一致;readmeLimit 是深度
  154. # 版的 README 截断(比榜单类的 2000/3000 更长)。
  155. github-daily-pick:
  156. url: "https://github.crawler.corp.shuidi.tech/api/trending"
  157. repoUrl: "https://github.crawler.corp.shuidi.tech/api/repos/:owner/:repo"
  158. windowDays: 90
  159. readmeLimit: 4000
  160. # 每周推荐回顾:纯读 covered store,无网络依赖(留空对象占位注册)。
  161. github-weekly-recap: {}
  162. # 定时生成(容器内进程内调度)。Next.js 服务启动时(instrumentation 钩子)注册
  163. # 一个进程内调度器,到点 spawn CLI 渲染——复用与 WebUI/HTTP 完全相同的链路,
  164. # 任务同样进 jobs 列表、走 OSS/飞书发布。改配置后需重启容器生效。
  165. # cron — 5 字段 cron(分 时 日 月 周),按 TZ(默认 Asia/Shanghai=北京时间)
  166. # template — 渲染模板(news|knowledge|opinion|marketing|github-trending|github-weekly)
  167. # platform — 平台规格(bilibili|douyin-long|douyin-short|...),默认 bilibili
  168. # source — 采集源(如 github-trending);定时场景一般用 source 自动取数
  169. # sourceArgs — 采集器附加参数(如 github-repo 的 owner/repo),可选
  170. # publish — 是否上传 OSS + 推送飞书,默认 true
  171. # enabled — 是否启用该条,默认 true
  172. # 环境变量 SCHEDULES(JSON 数组,同结构)可整体覆盖(部署期改无需重建镜像);
  173. # SCHEDULER_ENABLED=false 关闭整个调度器。
  174. schedules:
  175. - cron: "50 7 * * *" # 北京时间每天 07:50
  176. template: "github-trending"
  177. platform: "douyin-short" # 竖版 9:16
  178. source: "github-trending" # 先采集当日 trending,再解析→渲染→发布
  179. publish: true
  180. enabled: true
  181. - cron: "50 8 * * 6" # 北京时间每周六 08:50
  182. template: "github-weekly"
  183. platform: "bilibili"
  184. source: "github-weekly" # 采集本周 trending(since=weekly),再解析→渲染→发布
  185. publish: true
  186. enabled: true
  187. - cron: "20 9 * * *" # 北京时间每天 09:20(错开 07:50 榜单与周六 08:50 周榜)
  188. template: "github-daily-pick"
  189. platform: "bilibili"
  190. source: "github-daily-pick" # 三榜并集选题,六幕叙事推荐一个开源项目
  191. publish: true
  192. enabled: false # 已取消每日推荐
  193. - cron: "20 18 * * 0" # 北京时间每周日 18:20(覆盖当天上午的推荐,回顾完整一周)
  194. template: "github-weekly-recap"
  195. platform: "bilibili"
  196. source: "github-weekly-recap" # 读本周已讲记录生成回顾,不重新爬榜
  197. publish: true
  198. enabled: false # 已取消每周推荐回顾