feat: rewrite cover generation — 480×800 portrait, themed AI backgrounds, two-layer pipeline
Made-with: Cursor
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user