Loading...
Loading...
Run configurable opencli news commands sequentially, skip failed commands, normalize JSON stories, and deduplicate globally by URL before producing daily fresh-news and per-run fresh-news markdown digests. Use when user wants repeatable multi-source news aggregation with easy command add/remove via commands.json and requires model-handled translation (no third-party translation API).
npx skill4agent add xusz12/newsflowskills newsflow<SKILL_ROOT>SKILL.mdpython3<SKILL_ROOT><SKILL_ROOT>/references/commands.json--config.news_state/tmp_current.json.news_state/runs/<run-dir>/WORKDIR=<absolute current working directory>
STATE_DIR=<WORKDIR>/.news_state
RUNS_DIR=<STATE_DIR>/runs
RUN_DIR=<RUNS_DIR>/<unique-run-dir>
CURRENT_JSON_PATH=<RUN_DIR>/current.json
INCREMENTAL_JSON_PATH=<RUN_DIR>/incremental.json
TRANSLATED_JSON_PATH=<RUN_DIR>/translated.jsonpython3 "<SKILL_ROOT>/scripts/run_news_pipeline.py" --config "<commands.json>" --out-json "<CURRENT_JSON_PATH>"preparepython3 "<SKILL_ROOT>/scripts/run_incremental_news.py" prepare --current-json "<CURRENT_JSON_PATH>" --state-dir "<STATE_DIR>" --out-json "<INCREMENTAL_JSON_PATH>"preparepreparePREPARE_*<RUN_DIR>preparecurrent.jsonincremental.jsontranslated.jsonpreparePREPARE_STALE_CURRENT_JSONPREPARE_RUN_ID_ALREADY_FINALIZEDPREPARE_CURRENT_JSON_UNREADABLEPREPARE_BAD_ARTIFACT_PATHPREPARE_BAD_CURRENT_JSONcurrent.jsonPREPARE_BAD_RUN_METADATAPREPARE_BAD_STATEPREPARE_WRITE_FAILEDincremental.jsonrun_fresh_items_rawitems_to_translatecurrent_run_errors已恢复:...daily_errorsrun_idstarted_atfinished_atrun_output_stemYYYY-MM-DD-HH-mm-ss-<sha256前12位>generated_at + run_idsection_metadatastate_snapshotpreparefinalizeautopython3 "<SKILL_ROOT>/scripts/run_incremental_news.py" plan-translations --incremental-json "<INCREMENTAL_JSON_PATH>" --translated-json "<TRANSLATED_JSON_PATH>" --out-json "<RUN_DIR>/translation-plan.json" --phase initialbatches[*].itemstranslation-plan.jsonbatch_source_char_limit<RUN_DIR>/translation-initial-batch-NNN.jsonexpected_urlspython3 "<SKILL_ROOT>/scripts/run_incremental_news.py" merge-translation-batch --plan-json "<RUN_DIR>/translation-plan.json" --batch-id batch-NNN --batch-json "<RUN_DIR>/translation-initial-batch-NNN.json" --translated-json "<TRANSLATED_JSON_PATH>"required_fieldstitletitletitletextquoted_textquotedTweet.textsummarysummary<TRANSLATED_JSON_PATH>titlesummarysummary_zhitems_to_translate{}<TRANSLATED_JSON_PATH>python3 "<SKILL_ROOT>/scripts/run_incremental_news.py" validate-translations --incremental-json "<INCREMENTAL_JSON_PATH>" --translated-json "<TRANSLATED_JSON_PATH>"ok=trueok=falsepython3 "<SKILL_ROOT>/scripts/run_incremental_news.py" plan-translations --incremental-json "<INCREMENTAL_JSON_PATH>" --translated-json "<TRANSLATED_JSON_PATH>" --out-json "<RUN_DIR>/translation-repair-plan.json" --phase repairmerge-translation-batchtranslation-repair-batch-NNN.jsontranslation-repair-plan.jsonvalidate-translationstranslation-validation.jsonfinalizeerrorsvalidate-translations{
"https://example.com/story": "中文标题",
"https://x.com/ivanalog_com/status/123?s=20": {
"title": "中文正文标题",
"quoted_text_zh": "引用推文中文翻译"
},
"https://www.bloomberg.com/news/articles/example": {
"title": "中文标题",
"summary_zh": "中文摘要"
}
}python3 "<SKILL_ROOT>/scripts/run_incremental_news.py" finalize --incremental-json "<INCREMENTAL_JSON_PATH>" --translated-json "<TRANSLATED_JSON_PATH>" --state-dir "<STATE_DIR>" --out-dir "<WORKDIR>"python3 "<SKILL_ROOT>/scripts/export_outputs.py" --daily "<daily_fresh_path>" --fresh "<run_fresh_path>" --target-root "<export_root>".newsreader.json--target-rootNEWSFLOW_EXPORT_ROOT/Users/x/Library/Mobile Documents/iCloud~md~obsidian/Documents/DailyNewsYYYY年M月dailyFreshNews_YYYY-MM-DD.mdYYYY-MM-DD-HH-mm_freshNews.mdYYYY-MM-DD-HH-mm-ss-<12hex>_freshNews.mdfinalizefinalizeFINALIZE_*FINALIZE_STATE_CHANGED_SINCE_PREPAREpreparecurrent_json_pathincremental.json.paths.current_json_pathSTATE_DIRINCREMENTAL_JSON_PATHpreparetranslated.jsonitems_to_translatefinalizecurrent.jsonprepareFINALIZE_OUTPUT_EXISTSFINALIZE_WRITE_FAILEDfinalizetranslated.jsonfinalizeFINALIZE_STATE_CHANGED_SINCE_PREPAREpreparepreparecurrent.jsonFINALIZE_BAD_ARTIFACT_PATHFINALIZE_BAD_INCREMENTAL_JSONincremental.jsonFINALIZE_BAD_TRANSLATED_JSONtranslated.jsonFINALIZE_BAD_RUN_METADATAFINALIZE_BAD_INCREMENTAL_METADATAFINALIZE_BAD_STATEFINALIZE_RUN_ALREADY_FINALIZEDFINALIZE_OUTPUT_EXISTSfreshNews.mdFINALIZE_WRITE_FAILEDdailyFreshNews_YYYY-MM-DD.mdYYYY-MM-DD-HH-mm-ss-<sha256前12位>_freshNews.mdAsia/ShanghaidailyFreshNews_YYYY-MM-DD.newsreader.json*_freshNews.newsreader.jsonrun_sidecar_pathpreparefinalize<STATE_DIR>/runs/<run-dir>/finalizerun_output_stempreparecurrent.json0 条新增preparepreparepreparecurrent.jsonfinalize<STATE_DIR>/YYYY-MM-DD.jsondatetimezonesection_ordertoday_seen_urlstoday_first_seen_itemsdaily_errorsruns<STATE_DIR>/runs/<run-dir>/run_idstarted_atfinished_atcurrent_json_pathruns[-1]runs[-1].run_fresh_countruns[-1].daily_fresh_countruns[-1].error_countruns[-1].run_fresh_pathruns[-1].daily_fresh_pathrun_idcurrent_json_pathincremental_json_pathtranslated_json_pathprepared_atfinalized_atruns0[
{
"section": "middle-east",
"display_name": "Reuters · Middle East",
"source_type": "reuters",
"source_name": "Reuters",
"translation_policy": "always",
"command": ["opencli", "ReutersBrowser", "news", "https://www.reuters.com/world/middle-east/", "--limit", "10", "--format", "json"]
}
]commanddisplay_namesource_typesource_namesource_handleretry_oncefallback_commandtreat_empty_as_failuremin_valid_itemstranslation_policyalwaysautoneverretry_oncetreat_empty_as_failure: truemin_valid_items: 1retry_oncetranslation_policy: "always"translation_policy: "auto"## section(N条)Reuters · WorldTechCrunch> N条|最新 ...|最早 ...|时间倒序---(0条)## 本次无更新的分组(X个)- 无## Reuters · World(3条)
> 3条|最新 2026-04-09 10:00:00|最早 2026-04-09 08:00:00|时间倒序
### [中文标题](https://...)
- 发布时间:YYYY-MM-DD HH:MM:SS## 本次无更新的分组(2个)
- Bloomberg
- Reuters · World页面未显示summarysummary_zhsummary_zhfinalizetwitter user-posts --jsonreferences/commands.jsonsource_type: "twitter"source_handlesource_namesource_handlesource_nameauthor_screen_nameauthor_namecommands.jsontextauthor.namesectionhttps://x.com/{screenName}/status/{id}?s=20createdAtLocalquotedTweet.texttitlequoted_text_zhquoted_textquoted_text_zhquoted_text_zh## errors
### 1. section
- 命令:`...`
- 错误:...本次无更新的分组dailyFreshNews_YYYY-MM-DD.mdYYYY-MM-DD-HH-mm-ss-<sha256前12位>_freshNews.md*_fullNews.md