LazyLibrarian + pushplus:电子书入库推到微信
效果:图书抓取或入库完成后,微信收到一条提醒。
前置条件
- 一个 pushplus token(官网扫码获取)
- 能改 LazyLibrarian 配置 / 通知 / 自定义脚本
软件自带通知若只 POST 自家 JSON,不会自动变成 title / content。
配置步骤
方式一:通知里的 HTTP / Webhook
打开 Config → Notifications(或等价菜单)。若有 Webhook / 自定义 HTTP:
- 能写 JSON 时,POST
https://www.pushplus.plus/send:
{
"token": "你的token",
"title": "LazyLibrarian 入库",
"content": "有图书处理完成,请打开 LazyLibrarian 查看",
"template": "markdown"
}
- 只能填 URL 时:
https://www.pushplus.plus/send?token=你的token&title=电子书有更新&content=请打开LazyLibrarian查看
按需勾选 snatched / downloaded,不要所有事件都开。
方式二:完成后脚本
通知页若支持 Custom Script,指向自己的脚本:
#!/bin/sh
curl -s -X POST "https://www.pushplus.plus/send" \
-H "Content-Type: application/json" \
-d "{\"token\":\"你的token\",\"title\":\"LazyLibrarian\",\"content\":\"$1 $2\",\"template\":\"markdown\"}"
参数个数以 LazyLibrarian 传给脚本的为准,拼进 content,空时写兜底句。完整参数见 消息接口文档。
验证
curl -X POST "https://www.pushplus.plus/send" \
-H "Content-Type: application/json" \
-d '{"token":"你的token","title":"LazyLibrarian 配置测试","content":"token 可用","template":"markdown"}'
返回 code 为 200 后,用通知页测试或手动入库一本。
常见问题
搜到就推、入库又推? 只开 downloaded / processed。见 接口限制。
脚本没执行? 给脚本执行权限,并看 LazyLibrarian 日志里的 notify 错误。
收不到消息见 排查说明。