← 返回
未分类 中文

Daily News Portal (Prasowka)

Generate a daily news portal as a single HTML file. Uses fetch_news.py + web_fetch + LLM for summaries. 18 categories, dark/light toggle, responsive layout.
生成单文件每日新闻门户,使用 fetch_news.py + web_fetch + LLM 摘要,18 个分类,暗黑/明亮切换,响应式布局。
nerua1 nerua1 来源
未分类 clawhub v1.0.2 1 版本 100000 Key: 无需
★ 0
Stars
📥 326
下载
💾 0
安装
1
版本
#automation#daily#latest#news#portal

概述

Daily News Portal (Prasowka)

Generate a daily news portal as a single HTML file.

Parameters

  • OUTPUT: /canvas/prasowka-{YYYYMMDD}.html
  • DATA_DIR: /skills/prasowka/data
  • REFS_DIR: /skills/prasowka/references

Steps

Step 1: Initialize

mkdir -p <workspace>/canvas <workspace>/skills/prasowka/data
DATE=$(date +%Y%m%d)
SEEN_URLS_FILE="$DATA_DIR/seen_urls.json"

Step 2: Load Configuration

Read $REFS_DIR/topics.md — format:

ai-models: 15
ai-tools: 10
ai-video: 15
...

Step 3: Fetch News per Topic

Launch a subagent for each topic:

def fetch_topic_news(topic, limit):
    result = subprocess.run([
        "python3", "scripts/fetch_news.py",
        "--topic", topic,
        "--limit", str(limit)
    ], capture_output=True, text=True)
    
    if result.returncode != 0:
        return web_search(f"latest {topic} news {limit}")
    
    return json.loads(result.stdout)

Step 4: Filter URLs

def filter_new_urls(articles, seen_urls):
    return [a for a in articles if a['url'] not in seen_urls]

Step 5: Fetch & Summarize per Article

Launch a subagent for each article:

def summarize_article(url):
    content = web_fetch(url, extract_text=True)
    if not content or len(content) < 100:
        return None
    summary = llm_summarize(content[:3000])
    return summary

Step 6: Generate HTML

Use template with dark/light toggle, 18 categories, 2-3 sentence summaries.

Step 7: Save & Update

  • Save HTML to canvas
  • Update seen_urls.json
  • Run prasowka-guardian validation

Error Handling

  • fetch_news.py fails → fallback to web_search
  • Article unavailable → skip
  • Summary empty → use first 3 sentences
  • Don't stop — keep going

Requirements

  • scripts/fetch_news.py
  • references/topics.md
  • references/format.md

If this saved you time: ☕ PayPal.me/nerudek

版本历史

共 1 个版本

  • v1.0.2 当前
    2026-05-07 19:31 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

it-ops-security

Skill Vetter — Security Audit for AI Skills

nerua1
在安装来自 ClawdHub、GitHub 等来源的技能前,以安全为核心进行审查,检查危险信号和权限范围。
★ 0 📥 1,370
knowledge-management

Summarize

paudyyin
智能摘要工具,自动为长文本、文档、网页生成摘要,提取要点与关键词,支持自定义摘要长度。
★ 964 📥 521,887
knowledge-management

web-tools-guide

user_ec205dbb
MANDATORY before calling web_search, web_fetch, browser, or opencli. Contains required error-handling procedures (web_se
★ 82 📥 166,732