kb-abstract-fetch
3
总安装量
1
周安装量
#61837
全站排名
安装命令
npx skills add https://github.com/tiangong-ai/skills --skill kb-abstract-fetch
Agent 安装分布
openclaw
1
Skill 文档
KB Abstract Fetch
Core Goal
- Reuse the same PostgreSQL connection env variables as
kb-meta-fetch. - Select rows whose
abstractis empty and order by newestcreated_atfirst. - Open
https://doi.org/<doi>in OpenClaw Browser and extract abstract text. - Write back only when the row is still empty at update time.
- Default to dry run; require explicit
--applyto write.
Required Environment
KB_DB_HOSTKB_DB_PORTKB_DB_NAMEKB_DB_USERKB_DB_PASSWORDKB_LOG_DIR(required run log directory)
Workflow
- Run local self-test first (no DB/browser required):
python3 scripts/kb_abstract_fetch.py --self-test
- Dry run first (default mode; no DB write):
python3 scripts/kb_abstract_fetch.py --limit 100
- Apply updates after review:
python3 scripts/kb_abstract_fetch.py --limit 100 --apply
- Override table/column names when needed (
created_atis fixed and required):
python3 scripts/kb_abstract_fetch.py \
--table journals \
--doi-column doi \
--abstract-column abstract \
--limit 100 \
--apply
Safety Contract
- Selection filter:
- DOI not empty
abstractempty (NULLor blank)
- Selection order:
- newest
created_atfirst (ORDER BY created_at DESC NULLS LAST LIMIT n)
- newest
- Update filter (second guard):
WHERE doi = ? AND abstract is still empty
- Run summary:
- emit
RUN_SUMMARY_JSON=<json>for current run only.
- emit
- Abort behavior:
- stop early when errors exceed
--max-errors.
- stop early when errors exceed
Browser Requirement
openclawCLI must be installed.- Script checks
openclaw browser status; if browser is not running, it triesopenclaw browser start. - If start fails (for example extension tab not attached), attach OpenClaw browser session first, then rerun.
Script
scripts/kb_abstract_fetch.py