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

@@ -74,9 +74,14 @@ def create_issue():
.order_by(Article.pub_date.asc()).all()
]
categories_list = []
for a in Article.query.filter(Article.id.in_(included_ids)).all():
categories_list.extend(json.loads(a.categories))
try:
cover_path = generate_cover(
cover_method, config.ISSUES_DIR, week_start, week_end, headlines
cover_method, config.ISSUES_DIR, week_start, week_end,
headlines, categories_list
)
epub_path = build_epub(
week_start, week_end, included_ids, cover_path, config.ISSUES_DIR