← 返回
未分类 Key

research-gif-enricher

Auto-enrich Bear research notes tagged 「待整理」 with topic-matched GIFs. Reads notes via grizzly, searches GIFs via gifgrep, appends media, and removes the tag....
自动为标记「待整理」的 Bear 研究笔记匹配主题 GIF,使用 grizzly 读取笔记,gifgrep 搜索 GIF,附加媒体后移除标签。
terrycarter1985
未分类 clawhub v0.1.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 248
下载
💾 0
安装
1
版本
#latest

概述

Research Assistant

Batch-process Bear notes tagged 「待整理」: find a relevant GIF for each note, append it, then remove the tag.

Prerequisites

  • Bear running + grizzly installed + token at ~/.config/grizzly/token
  • gifgrep skill available

Workflow

  1. Fetch tagged notes

```bash

grizzly open-tag --name "待整理" --enable-callback --json --token-file ~/.config/grizzly/token

```

Parse the JSON to get note IDs and titles/summaries.

  1. For each note:

a. Read full content

```bash

grizzly open-note --id "$NOTE_ID" --enable-callback --json

```

b. Derive a GIF search query — extract 2–3 keywords from the note title or key findings. Prefer concrete nouns and verbs over abstract terms.

c. Search for a GIF using the gifgrep skill (or web_search + web_fetch as fallback) with the derived query.

d. Append the GIF to the note under a ## Supporting Media heading:

```bash

printf '\n## Supporting Media\n\n!%s\n' "$ALT_TEXT" "$GIF_URL" \

| grizzly add-text --id "$NOTE_ID" --mode append --token-file ~/.config/grizzly/token

```

e. Remove the 「待整理」 tag — replace note content with the tag removed, or use Bear's tag API:

```bash

grizzly create --title "$TITLE" --tag "$OTHER_TAGS" < /dev/null

# Then delete the old note if needed, or strip the tag from content

```

Simplest approach: append a line that re-tags the note (Bear removes a tag when it's deleted from the note body). Use sed on the note content to strip #待整理 and re-write via grizzly add-text --mode replace.

  1. Report — list processed notes and any failures.

Script

For batch runs, use scripts/process_tagged.sh:

bash scripts/process_tagged.sh

The script reads all notes tagged 「待整理」, extracts keywords, and calls the gifgrep search endpoint. It appends the top GIF result and strips the tag.

Notes

  • If no GIF matches, skip the note and log it — don't force irrelevant results.
  • Rate-limit Bear API calls (1–2 req/s) to avoid callback timeouts.
  • The script is a convenience wrapper; the agent can also drive the workflow step-by-step for more control.

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-05-21 14:46 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Code Formatter

terrycarter1985
代码格式化最佳实践及常用语言(Python、JavaScript、JSON、Markdown 等)的快速参考,使用 Prettier、Black、ESLint 等工具。
★ 0 📥 634

Python Support

terrycarter1985
OpenClaw代理的Python语言支持,提供环境配置、依赖管理、代码检查、测试及Python代码执行最佳实践。
★ 0 📥 658

Stock Alert Workflow

terrycarter1985
使用 Yahoo Finance 数据分析股票和加密货币,支持投资组合管理(创建、添加、移除资产),以及按市值排名前 20 的加密货币分析。
★ 0 📥 571