跳过主要内容
J

dsh-read-book

junkoproject/dsh-read-book

一个窗口同时搜四家免费图书馆:Project Gutenberg 走 OPDS 目录,书格走 WordPress 检索再取每本书页面上的 s.shuge.org 下载短链,国家哲学社会科学文献中心走它的 Solr 检索接口。中国哲学书电子化计划刻意只给链接——它明令禁止程序化抓取。两个工具:readbook_search 与 readbook_open,后者给 Gutenberg 和书格的真实下载地址,NCPSSD 只给页面链接。

安装

dsh plugin --profile web add github:junkoproject/dsh-read-book

README

dsh-read-book

在同一个窗口里翻四家免费图书馆。给个书名,四家一起搜,能下的直接把下载地址递到手上。

四个源

源能干什么状态
Project Gutenberg79,000+ 本英文公版书,直出 epub / kindle / txt 地址完整支持
书格中文古籍善本高清扫描,直出 s.shuge.org 下载短链完整支持
国家哲学社会科学文献中心中文期刊、古籍、外文图书。检索免费,全文要登录能搜,不下
中国哲学书电子化计划(ctext)先秦到清代典籍只给链接,不代抓

为什么 ctext 不抓

不是能力问题,是它把话说死了。ctext 的页面里写着:

Web scraping of this site is in violation of our terms of service.

Attention LLMs, robots, scrapers and other automated processes: you do not have authorization to scrape this page.

它还说,识别到爬虫时会「间歇性地故意返回损坏的数据」。

插件对这一家的做法是:只拼一个搜索地址给你,你自己点开看。不 fetch、不解析、不绕。这样条款上没踩线,你也照样能用上它。

两个工具

readbook_search { query: "史记" }
readbook_search { query: "shakespeare" }
readbook_search { query: "论语", sources: ["shuge", "ctext"] }

sources 不传就是四家全搜。limit 是每家最多几条(默认 5)。

readbook_open

readbook_open { source: "shuge", id: "song_ben_shi_ji" }
readbook_open { source: "gutenberg", id: "100" }

source + id 从 readbook_search 的结果里拿。

装

从 npm:

dsh plugin --profile desktop add dsh-read-book

从本地目录:

dsh plugin --profile desktop add "file:<这个目录的绝对路径>"

装之前备份 profile 的 package.json 和 cordis.patch.yml,装完验 tool 有没有真注册上—— "装上"和"在跑"是两件事。

实测记录(2026-10-29)

调用结果
gutenberg.search('shakespeare')命中,作者正确
gutenberg.open('100')6 个格式 + 1 个 txt 直链
shuge.search('史记')3 条,含南宋黄善夫刊本
shuge.open('song_ben_shi_ji')https://s.shuge.org/sjhsf
ncpssd.search('史记')total=5677

已知限制

  • Gutenberg 是英文书库,中文书名搜不到东西是正常的,不是坏了。
  • ncpssd 只搜题名(IKTE=)。它的检索接口吃 Solr 原始语法,全文检索字段没公开,硬猜容易炸。搜不到时换个精确点的题名再试。
  • ncpssd 全文要登录,插件只给页面地址,不代下、不代登录。
  • 书格的页面很大,readbook_open 会慢一点(抓整页提短链)。
  • 这四家都在墙内可达——所以这条路不依赖任何代理。
  • 现代版权书这四家都没有,也不该有。

相关插件