Skip to content

scholar-cli: search-google 缺 --workspace,结果进不了 BibTeX 流程 #61

Description

@xpzouying

#57 的 recipe 时发现的功能缺口。

现象

search-en 能把结果存进工作区,search-google 不能:

// cmd/root.go
searchEnCmd.Flags().String("workspace", "", "Workspace directory to save results (auto-dedup)")   // ✅
searchGoogleCmd.Flags().String("query", "", "Search query (required)")
searchGoogleCmd.Flags().Int("limit", 10, "Max results")                                            // ❌ 没有 workspace

后果是 Google Scholar 的结果只能打印到 stdout,无法参与后续流程:

search-en     → workspace → detail → download → export(BibTeX)   ✅ 完整
search-google → stdout    → 断了                                    ❌

export 只从 workspace 读,所以 Google Scholar 找到的论文进不了 BibTeX。

为什么可惜

Google Scholar 的独门价值是引用数,公开 API(arXiv / Semantic Scholar / CrossRef / OpenAlex)都给不了:

· Ragas: Automated evaluation of retrieval augmented g...
    S Es, J James, LE Anke | Proceedings of the 18th … | 2024 | cites: 2041

做文献调研时,「按引用数排序挑经典文献」恰恰是最常见的用法之一。现在用户拿到这份排序后,得手动把标题再喂给 search-en 才能进工作区。

(引用数字段本身在 #56 修好了——在那之前 Google Scholar 的 venue、year、authors 三个字段都是错的。)

建议

search-google--workspace,复用 search-en 已有的存储与去重逻辑(store 包)。去重尤其有价值:同一篇论文常常 arXiv 和 Google Scholar 各出现一次,合并后能把「引用数」和「PDF 链接」补进同一条记录。

同样的缺口在 search-cnki / search-wos 上也存在,可以一并处理。

完成后

#57 的 recipe(recipes/review-rag-literature.md)里 Google Scholar 那一节现在只能说「看引用数」,补上之后可以改成完整的「搜索 → 合并 → 导出」链路。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions