SuperAPI AI 工具集

scrivener-stats

写作与研究

查看项目

更新于 10-16 05:06

技能介绍

用途:帮助作者测量 Scrivener 3 项目的写作数据,包括总字数与分项字数、字符数、阅读时长与纸质页数估算、逐日写作历史,以及高频用词。所有命令均为只读,不会修改项目。

主要能力:stats [<id>] 统计字数、字符数、reading_time_minutes、paperback_pages_est、documents_with_text 与 scope;stats-history 读取 Files/writing.history,报告每日 draft_words、other_words 与 session_target 及汇总;stats-frequency [--top N] 列出 Draft 中最常用词(默认前 50),返回 unique_words 与 [word, count] 列表。

使用方式:命令均需 --project "<path.scriv>",默认输出 JSON,可用 --format text 输出可读文本。示例:python3 ${CLAUDE_PLUGIN_ROOT}/tools/scrivener/cli.py stats --project "<path.scriv>";python3 ${CLAUDE_PLUGIN_ROOT}/tools/scrivener/cli.py stats-history --project "<path.scriv>";python3 ${CLAUDE_PLUGIN_ROOT}/tools/scrivener/cli.py stats-frequency --top 25 --project "<path.scriv>"。

估算规则:reading_time_minutes 为 words ÷ 250;paperback_pages_est 为 words ÷ 350;字数与字符数由各文档 content.rtf 经 RTF 转文本后统计;documents_with_text 表示实际贡献正文的条目数。这些为粗略参考值。

限制:writing.history 由 Scrivener 维护,只读,不可重新生成或编辑;文件缺失时结果为空。按标题限定 stats <id> 时标题可能不唯一,建议用 UUID。文件夹与空文档计数为零属正常,缺少 content.rtf 也非损坏。云同步未完成时结果可能不完整。按文档/文件夹目标与截止日期计算、CSV 导出为计划功能,暂未提供。