Phase3: 三平台封面图生成
- cover_generator.py: Pillow生成知乎/微信/小红书封面图(渐变背景+标题) - 知乎 1200×630 蓝调, 微信 900×500 绿调, 小红书 1080×1440 红调 - creator.py 流水线增加 cover_generator 作为最终回退 - db_helper.py 新增 save_cover_to_article - main.py 挂载 /automation/images 静态目录 - articles.py preview 接口返回 images 字段 - topics.html 预览dialog展示封面图
This commit is contained in:
+3
-1
@@ -103,10 +103,12 @@ def run_pipeline(topic_id: str = None) -> Dict:
|
||||
update_topic_status(tid, 'pending')
|
||||
return {"ok": False, "error": "writer step failed"}
|
||||
|
||||
# 4. 配图生成(AI版,失败时回退PIL版)
|
||||
# 4. 配图生成(AI版 → PIL版 → 封面文字版)
|
||||
image_ok = run_step("ai_image_generator.py", tid)
|
||||
if not image_ok:
|
||||
image_ok = run_step("image_generator.py", tid)
|
||||
if not image_ok:
|
||||
image_ok = run_step("cover_generator.py", tid)
|
||||
|
||||
# 5. 合规优化(自动审核并标记为「待发布」)
|
||||
if not run_optimizer_step(tid):
|
||||
|
||||
Reference in New Issue
Block a user