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

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