fix: pipeline content tracking + topic article preview
db_helper.py: save_article now calculates and persists word_count generator.py: run_creator_blocking sets word_count for HTML-imported articles writer.py: fix title regex stripping content-leading numbers (35岁后→岁后) trends.py: fix Baidu hot_score str/int type comparison crash database.py: add missing content_tasks.org_id ALTER TABLE migration schemas.py + topics.py: topic list API returns article_count + articles[] previews topics.html: table view and card view show article badges with word counts, clickable to open preview Ultraworked with Sisyphus Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -84,8 +84,9 @@ def run_creator_blocking(topic_id: str = None, timeout: int = 1800):
|
||||
existing = db.query(Article).filter(Article.id == article_id).first()
|
||||
if existing:
|
||||
existing.html_content = html
|
||||
existing.word_count = len(html)
|
||||
else:
|
||||
db.add(Article(id=article_id, topic_id=topic_id, platform=platform_dir, file_path=f"db:{article_id}", html_content=html, status="draft"))
|
||||
db.add(Article(id=article_id, topic_id=topic_id, platform=platform_dir, file_path=f"db:{article_id}", html_content=html, word_count=len(html), status="draft"))
|
||||
hf.unlink()
|
||||
for platform_dir in ["zhihu", "wechat", "xiaohongshu"]:
|
||||
pdir = dd / platform_dir
|
||||
|
||||
Reference in New Issue
Block a user