feat: rewrite cover generation — 480×800 portrait, themed AI backgrounds, two-layer pipeline

Made-with: Cursor
This commit is contained in:
cottongin
2026-04-06 17:02:36 -04:00
parent 5fec07c287
commit 49acf09aa1
5 changed files with 190 additions and 71 deletions

View File

@@ -78,11 +78,16 @@ class SchedulerManager:
article_ids = [a.id for a in articles]
headlines = [a.title for a in articles]
categories_list = []
for a in articles:
categories_list.extend(json.loads(a.categories))
auto_pub = Setting.get("auto_publish", {})
method = auto_pub.get("cover_method", "text")
cover_path = generate_cover(
method, config.ISSUES_DIR, week_start, week_end, headlines
method, config.ISSUES_DIR, week_start, week_end,
headlines, categories_list
)
epub_path = build_epub(
week_start, week_end, article_ids, cover_path, config.ISSUES_DIR