Initial commit to git.yoin
This commit is contained in:
39
searchnews/scripts/ralph/prd.json
Normal file
39
searchnews/scripts/ralph/prd.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"date": "2026-01-25",
|
||||
"keywords_ref": "references/keywords.md",
|
||||
"sources": [
|
||||
{
|
||||
"name": "AIBase日报",
|
||||
"url": "https://news.aibase.com/zh/daily",
|
||||
"status": "failed",
|
||||
"priority": "high",
|
||||
"note": "1月25日日报尚未发布"
|
||||
},
|
||||
{
|
||||
"name": "IT之家智能时代",
|
||||
"url": "https://next.ithome.com/",
|
||||
"status": "done",
|
||||
"news_count": 10
|
||||
},
|
||||
{
|
||||
"name": "36氪",
|
||||
"url": "https://36kr.com/information/AI/",
|
||||
"status": "done",
|
||||
"news_count": 0,
|
||||
"note": "列表页无1月25日新闻"
|
||||
},
|
||||
{
|
||||
"name": "机器之心",
|
||||
"url": "https://www.jiqizhixin.com/articles",
|
||||
"status": "done",
|
||||
"news_count": 0
|
||||
},
|
||||
{
|
||||
"name": "量子位",
|
||||
"url": "https://www.qbitai.com",
|
||||
"status": "done",
|
||||
"news_count": 3
|
||||
}
|
||||
],
|
||||
"is_complete": true
|
||||
}
|
||||
12
searchnews/scripts/ralph/prd.template.json
Normal file
12
searchnews/scripts/ralph/prd.template.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"date": "YYYY-MM-DD",
|
||||
"keywords_ref": "references/keywords.md",
|
||||
"sources": [
|
||||
{"name": "AIBase日报", "url": "https://news.aibase.com/zh/daily", "status": "pending", "priority": "high"},
|
||||
{"name": "IT之家智能时代", "url": "https://next.ithome.com/", "status": "pending"},
|
||||
{"name": "36氪", "url": "https://36kr.com/information/AI/", "status": "pending"},
|
||||
{"name": "机器之心", "url": "https://www.jiqizhixin.com/articles", "status": "pending"},
|
||||
{"name": "量子位", "url": "https://www.qbitai.com", "status": "pending"}
|
||||
],
|
||||
"is_complete": false
|
||||
}
|
||||
16
searchnews/scripts/ralph/progress.txt
Normal file
16
searchnews/scripts/ralph/progress.txt
Normal file
@@ -0,0 +1,16 @@
|
||||
Ralph Loop Progress - 2026-01-24
|
||||
================================
|
||||
|
||||
[Round 1] 2026-01-24 15:xx
|
||||
- AIBase日报: done (最新日报为1月23日发布,提取相关内容)
|
||||
- IT之家: done (获取10+条1月24日新闻)
|
||||
- 36氪: done (获取多条AI相关新闻)
|
||||
- 机器之心: done (页面加载成功)
|
||||
- 量子位: done (获取多条热门新闻)
|
||||
|
||||
[Summary]
|
||||
- 所有源抓取完成
|
||||
- 共整理17条新闻
|
||||
- 日报已生成: dailynews/2026-01-24/news.md
|
||||
|
||||
<promise>COMPLETE</promise>
|
||||
21
searchnews/scripts/ralph/ralph.sh
Normal file
21
searchnews/scripts/ralph/ralph.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
# Ralph Loop 启动脚本 - 仅初始化,不循环
|
||||
|
||||
DATE=${1:-$(date +%Y-%m-%d)}
|
||||
PRD_FILE=".opencode/skills/searchnews/scripts/ralph/prd.json"
|
||||
PRD_TEMPLATE=".opencode/skills/searchnews/scripts/ralph/prd.template.json"
|
||||
|
||||
# 从模板创建/重置 prd.json
|
||||
if [ -f "$PRD_TEMPLATE" ]; then
|
||||
jq --arg date "$DATE" '.date = $date | .sources[].status = "pending" | .is_complete = false' "$PRD_TEMPLATE" > "$PRD_FILE"
|
||||
echo "Initialized prd.json for $DATE"
|
||||
else
|
||||
echo "Error: Template not found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Sources to crawl:"
|
||||
jq -r '.sources[] | " [\(.priority // "normal")] \(.name): \(.url)"' "$PRD_FILE"
|
||||
echo ""
|
||||
echo "Ready! Agent will now process each source and update prd.json status."
|
||||
Reference in New Issue
Block a user