Home
Softono

Send2kindle

Open source Python
54
Stars
15
Forks
6
Issues
3
Watchers
3 years
Last Commit

 About Send2kindle

Send2kindle is a Python-based daily novel push service designed for Kindle e-readers. It scrapes content from specified websites and converts daily updates into well-formatted MOBI ebook files, which are then delivered via email to your Kindle device. Unlike alternatives requiring Google App Engine deployment, this project supports self-hosting on personal servers, laptops, or Raspberry Pi devices. It is optimized for low resource consumption and features one-click startup using Docker and Docker Compose. Configuration involves editing a JSON file to specify novel URLs, desired chapter counts for full-text bundling, and SMTP credentials for sending emails via providers like 163 or 126. Users can manage reading progress by modifying a local SQLite database to avoid re-sending already read chapters. The system also supports optional notification alerts through WeChat public accounts via ServerChan if configured. While currently lacking a graphical web interface and RSS subscription support, it offers a streamli

Platforms

Web Self-hosted Docker

Languages

Python

Links

Need Help Installing Send2kindle?

We provide expert installation service for this software. Our team will install, configure, and secure Send2kindle on your server. plans start at just $30.

Send2kindle

View on GitHub

send2kindle

基于python2.7的小说每日推送服务,可以爬取指定网站的小说,并生成精美的mobi电子书推送到你心爱的kindle上。 和KindleEar必须翻墙部署到GAE上相比,本项目可以部署到你个人的服务器、树莓派或者笔记本电脑上,只要安装了docker与docker-compose,就可以进行一键启动,并且占用资源更少。可惜的是目前不支持RSS订阅。

项目仍处于起步阶段。

开发中

  • web 界面

TODO

  • 增加Docker方式启动对树莓派的支持
  • 一键初始化
  • 简化配置文件

本次更新

  • 现在可以生成精美的mobi格式电子书并推送到kindle上。
  • 添加对docker-compose的支持,一键启动
  • 优化配置文件

下载以及安装

下载

git clone https://github.com/palexu/send2kindle

配置

config.json.bak重命名为config.json, 打开该文件

添加你需要推送的小说,如:

{
      "name": "修真四万年",//小说名,只用于mobi内小说名的显示
      "url": "http://www.biqudao.com/bqge7946",//小说的目录页
      "count": 10//满10条推送
    }

注意,由于每次推送会把所有更新的章节都打包一起推送(相当于全文推送),因此如果添加的小说章节数过多,采集章节内容时间会很长,并且最终生成的mobi文件体积可能过大。

解决方案:目前没有提供易用的界面来设置当前已阅读到的章节,熟悉sql的同学可以手动添加一条记录到sqlite db文件中,

INSERT INTO
readed(bookname, at)
VALUES("书名","章节名")

配置你个人的smtp邮箱

    "mail": {
    "hostconf": {
       "163": {//只是一个标记
        "sender": "你的邮箱@163.com",
        "password": "你的密码",
        "host": "smtp.163.com"//smtp服务器地址
      }
    },
    "receiver": "[email protected]", //你的kindle邮箱地址,切记将上面的sender加入到信任列表
    "init_host_config": "163",//上面的key值
    "subject": "",//邮箱主题,留空即可
    "msgcontent": "deliver by send2kindle"
  }

经测试,支持126、163邮箱,其他邮箱的话,附件可能会被吞掉

非必填项:配置推送完成后的消息提醒,通过微信公众号serverChan进行消息推送, 详情见Server酱,申请一个key即可

  "serverChan": {
    "scKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  }

运行方式:

除raspberry-pi外的其他平台

推荐使用docker以及docker-compose的方式运行

安装docker以及docker-compose

运行docker-compose up -d

可以通过docker logs -f s2k查看系统运行的日志

raspberry-pi

由于树莓派的cpu为ARM架构,因此本项目的dockerfile可能无法直接使用,需要改为专为ARM设计的容器,目前暂没有时间去测。计划下两次更新内将这个问题解决。

致谢

使用了kindleEar拆离的calibre的mobi、epub电子书生成模块, 使用了serverChan提供的消息推送服务