This repository has been archived on 2026-02-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
openclaw-skills/skills/obsidian-kb/config.yaml
T
OpenClaw Agent e0a2b323d9 Update obsidian-kb skill and add find-skills
- obsidian-kb: Add OCR processors (easyocr, tesseract)
- obsidian-kb: Fix subtitle detection with test files
- obsidian-kb: Add cookie verification script
- Add find-skills skill for discovering capabilities
- Add video processing scripts
- Update clawhub lock file
2026-02-09 11:53:42 +08:00

110 lines
3.6 KiB
YAML

# Obsidian KB 配置文件
# 优先级: ./config.yaml > ~/.obsidian-kb/config.yaml > ~/.config/obsidian-kb/config.yaml
# AI 配置
ai:
provider: openai # AI 提供商
model: gpt-4 # 模型名称
api_key: sk-... # API Key (建议使用环境变量: OPENAI_API_KEY)
# 存储配置
storage:
inbox_dir: inbox # 收件箱目录
topics_dir: topics # 主题目录
data_dir: data # 数据目录
# 输出配置
output:
format: markdown # 输出格式
encoding: utf-8 # 文件编码
include_timestamp: true # 包含时间戳
include_source: true # 包含源链接
# Git 同步配置
git:
enabled: true # 启用 Git 同步
vault_path: ~/ObsidianVault # Obsidian 知识库路径
remote: origin # 远程仓库名
branch: main # 分支名
auto_commit: true # 自动提交
commit_message_template: "Update from obsidian-kb: {count} items"
# 分段配置
chunking:
enabled: true # 启用长视频分段
chunk_duration_seconds: 900 # 分段时长 (15分钟)
max_chunk_duration_seconds: 1800 # 最大分段时长 (30分钟)
long_video_threshold: 1800 # 长视频阈值 (30分钟)
# 数据源配置
sources:
bilibili:
enabled: true
cookie: '' # Bilibili Cookie (可选,环境变量: BILIBILI_COOKIE)
youtube:
enabled: false
api_key: '' # YouTube API Key
zhihu:
enabled: true
use_drissionpage: true # 使用 DrissionPage 绕过检测(推荐)
cookie_file: ~/.obsidian-kb/zhihu_cookies.json # Cookie 文件路径
cookie_str: "" # 可选:直接在配置中填入 Cookie JSON (环境变量: ZHIHU_COOKIE)
timeout: 30
headless: true
# Bilibili 提取器配置
bilibili_extraction:
use_playwright: true # 使用 Playwright 绕过检测
headless: true # 无头模式
cookie_file: '' # Cookie 文件路径 (可选)
enable_subtitle: true # 启用字幕提取
subtitle_language: zh-CN # 字幕语言
enable_danmaku: false # 启用弹幕提取
timeout_seconds: 30 # 超时时间
max_retries: 3 # 最大重试次数
# 硬字幕提取配置 (OCR 方式)
hard_subtitle:
# 是否启用硬字幕提取功能
enabled: true
# OCR 引擎选择
# 可选值: "paddleocr" (推荐), "tesseract"
engine: "paddleocr"
# 字幕区域检测配置
detection:
# 默认字幕区域: "bottom" (底部), "full" (全屏), "auto" (自动检测)
default_region: "bottom"
# 当默认区域未检测到字幕时,是否自动回退到全屏模式
fallback_auto: true
# 是否缓存字幕区域检测结果(提升处理速度)
cache_region: true
# OCR 识别配置
ocr:
# 置信度阈值: 低于此值的识别结果将被过滤
confidence_threshold: 0.7
# 批处理大小: 每次处理的帧数(影响内存使用和速度)
batch_size: 32
# 最大并发工作线程数
max_workers: 4
# 视频帧提取配置
video:
# 抽帧间隔 (秒): 每隔多少秒抽取一帧进行识别
interval_seconds: 5
# 最大抽取帧数: 防止处理过长视频导致资源耗尽
max_frames: 500
# 流式处理模式: 逐步读取视频帧,避免一次性加载整个视频
stream_mode: true
# 后处理配置
postprocess:
# 是否启用去重: 去除连续相同的字幕文本
deduplicate: true
# 最小文本长度: 少于此长度的识别结果将被视为噪声
min_length: 2
# 是否过滤噪声: 使用规则过滤明显错误的识别结果
filter_noise: true