A website application running in Google app engine, deliver rss news to your kindle. generate mobi using python, multilanguages supported.

Overview

Readme of english version refers to Readme_EN.md

简介

这是一个运行在Google App Engine(GAE)上的Kindle个人推送服务应用,生成排版精美的杂志模式mobi/epub格式自动每天推送至您的Kindle或其他邮箱。

此应用目前的主要功能有:

  • 支持类似Calibre的recipe格式的不限量RSS/ATOM或网页内容收集
  • 不限量自定义RSS,直接输入RSS/ATOM链接和标题即可自动推送
  • 多账号管理,支持多用户和多Kindle
  • 生成带图的杂志格式mobi或带图的有目录epub
  • 自动每天定时推送
  • 内置共享库,可以直接订阅其他网友分享的订阅源,也可以分享自己的订阅源给其他网友
  • 强大而且方便的邮件中转服务
  • 和Evernote/Pocket/Instapaper等系统的集成

注:如果您要求不高,自定义RSS推送功能足以应付一般应用,如果要求排版和完美,可以参照books目录下的文件范本自己添加一个文件再重新上传即可,books目录下的书籍文件都不是随意预置的,每个文件都至少演示一个适用的books编写技巧。 在您懂python的前提下,您可以完全的操控网页,可以生成您需要的最完美的MOBI/EPUB文件。

标准部署步骤

  1. 申请google账号 并暂时 启用不够安全的应用的访问权限 以便上传程序。

  2. 创建一个Application,注意不用申请GCE,那个是60天试用的,而GAE是限额范围内永久免费的。

  3. 安装 Python 2.7.x

  4. 安装 GAE SDK

  5. 下载 KindleEar ,解压到一个特定的目录。

  6. 在以下三个文件中修改一些参数:

文件 待修改内容 说明
app.yaml application 你的ApplicationId
module-worker.yaml application 你的ApplicationId
config.py SRC_EMAIL 创建GAE工程的GMAIL邮箱
config.py DOMAIN 你申请的应用的域名

如果使用gcloud部署,需要注释掉yaml文件中的application/version项。

  1. 转到GAE SDK安装目录(默认为:C:\Program Files\Google\google_appengine)

  2. 部署命令:
    8.1 使用appcfg.py:

    • c:\python27\python.exe appcfg.py update kindleear目录\app.yaml kindleear目录\module-worker.yaml
    • c:\python27\python.exe appcfg.py update kindleear目录

8.2 使用gcloud:
* 删除app.yaml和module-worker.yaml开头的两行:application / version
* gcloud auth login
* gcloud config set project 你的ApplicationId
* gcloud app deploy --version=1 KindleEar目录\app.yaml KindleEar目录\module-worker.yaml
* gcloud app deploy --version=1 KindleEar目录
* [如果服务器没有正常创建数据库索引,可能需要手动执行如下语句]
gcloud datastore indexes create KindleEar目录\index.yaml

  1. 全部完成后就可以尝试打开域名:
    http://appid.appspot.com (appid是你申请的application名字)
    比如作者的网站域名为:http://kindleear.appspot.com/
    注:初始用户名为 admin,密码为 admin,建议登录后及时修改密码。

  2. 更详细一点的说明请参照Github上的 FAQ 或作者网站的 FAQ 链接。有关部署失败,部署后"internal server error"等问题都有解释。
    不建议使用GAE Launcher部署KindleEar,除非你知道怎么设置Extra Flags等参数。

简化的部署步骤(推荐)

假如你不想安装python和GAE SDK,则可以选择如下两种方法之一:

  1. 参考代码库 https://github.com/bookfere/KindleEar-Uploader ,里面有详细的教程和服务器脚本,也很简单。

  2. 使用本机脚本:
    2.1 下载KindleEar 并解压(改目录名为KindleEar)。
    2.2 下载KindleEar-Uploader 并解压。
    3.3 将KindleEar目录放到Uploader目录下,双击uploader.bat即开始上传,根据提示输入你的相关信息即可,在第一次成功部署之后,适用uploader再次升级KindleEar则不需要再次输入。
    此uploader仅适用于Windows系统。

许可协议

KindleEar is licensed under the AGPLv3 license.
大体的许可框架是此应用代码你可以任意使用,任意修改,可以商用,但是必须将你修改后的代码开源并保留原始版权声明。

主要贡献者

Comments
  • 使用 uploader 上传时出现 Error 404: https://developers.google.com/accounts/docs/AuthForInstalledApps

    使用 uploader 上传时出现 Error 404: https://developers.google.com/accounts/docs/AuthForInstalledApps

    RT,以下是具体的上传情况:

    10:10 AM Getting current resource limits.
    Email: [email protected]
    Password for [email protected]:
    10:10 AM Scanning files on local disk.
    Email: [email protected]
    Password for [email protected]:
    Error 404: --- begin server output ---
    https://developers.google.com/accounts/docs/AuthForInstalledApps
    --- end server output ---
    
    opened by miaowm5 32
  • 目录跳转有问题,请求帮忙解决!

    目录跳转有问题,请求帮忙解决!

    目前的MOBI生成模块在生成杂志模式MOBI发送到kindle还存在此BUG,请求高人帮忙解决。 问题描述: 目前每次在文章中按“View Sections & Articles”后会跳到目录的第一项,而使用kindlegen和calibre生成的MOBI每次按"View Sections & Articles"都会跳到你正在看的这篇文章对应的目录项。

    opened by cdhigh 28
  • 设置extra_css无法生效

    设置extra_css无法生效

    在books下的书里增加 extra_css = ''' body { font-size: 1em; text-align: justify; line-height: 1.618em; margin: 0; } p { font-size: 1em; text-align: justify; line-height: 1.618em; } h1 { font-size: large; } ''' 无论怎么都无法生效,请帮助看看到底是怎么回事呢,是不是有bug啊

    opened by richars 25
  • Book 'XXX' import failed : invalid syntax (XXX.py, line 27)

    Book 'XXX' import failed : invalid syntax (XXX.py, line 27)

    Book 'XXX' import failed : invalid syntax (XXX.py, line 27) 不知道代码什么地方写错了,第27行是remove_classes,27行开始的几行如下:

        remove_classes = [
                'articleFooter',
                'articleTools',
                'rfd', 'story-footer-links', 'page-footer',
                'columnGroup singleRule',
                'columnGroup last',
                'columnGroup  last',
                'doubleRule',
                'dottedLine',
                'entry-meta',
                'entry-response module',
                'leftNavTabs',
                'metaFootnote',
                'messages',
                ]
    

    其实一开始用的是remove tags,大概如下:

       remove_tags = [
            dict(attrs={'class': [
                'articleFooter',
                'articleTools',
                ]})]
    

    可发现推送的文件依然没有移除这些class,于是就添加了remove classes,想不到提示no news,日志显示标题的错误。请教是什么地方写错了。

    opened by Steven630 25
  • 一天推送多次好像没有成功

    一天推送多次好像没有成功

    如何一天推送多次?

    需要及时跟踪网站最新消息的同学可能有一天推送多次的需求,以下步骤告诉你如何实现:

    在books目录下添加一个py文件。 deliver_times设置为你需要推送的整点时间列表。 比如: deliver_times=[6,14,22] #6:00,14:00,22:00三次推送 如果需要,oldest_article设置为多次推送的间隔秒数,这样就不推送重复文章了。 比如: oldest_article=28800 #86060

    按照大神的指导这么做,不过好像还只是一天推送一次。这个意思是我只要新建一个py文件,然后写上这两句上传就行了吗?谢谢!

    opened by mrsoshining 21
  • 折腾半天还是没部署上

    折腾半天还是没部署上

    因为看到python2已经不支持了,就在本机用gcloud部署,但是总是出错。

    Beginning deployment of service [default]...
    ╔════════════════════════════════════════════════════════════╗
    ╠═ Uploading 0 files to Google Cloud Storage                ═╣
    ╚════════════════════════════════════════════════════════════╝
    File upload done.
    WARNING: You will be unable to deploy applications after November 30, 2019 without adding a billing instrument to your project. Please add one at https://console.cloud.google.com/billing/linkedaccount?kindlerss-274914
    
    Updating service [default]...failed.                                           
    ERROR: (gcloud.app.deploy) Error Response: [7] Access Not Configured. Cloud Build has not been used in project kindlerss-274914 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/cloudbuild.googleapis.com/overview?project=kindlerss-274914 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
    

    看样子上传文件成功了,那下面这个服务无法启动是啥意思?我估计是翻墙的稳定性造成的,不知对不对。 然后看到有cloud shell的方案,试了下,倒是没有翻墙的问题了,但是提示python版本太低,还是无法顺利打开服务。 所以现在各条路都走不通,麻烦大家给看看,应该怎么办?

    opened by jeezy711 15
  • 有的图片未抓取

    有的图片未抓取

    又来请教高手,是抓取Economist时遇到的问题,几乎所有图表都没有抓取到,无论是readability自动抓取还是自己写py都有这个问题。

    比如这篇文章:http://www.economist.com/news/china/21719508-can-money-buy-sort-thing-china-spending-billions-make-world-love-it

    同样是正文的图片,也都是figure的标签,这张保留了(文章中间的合照):

    <figure class="blog-post__inline-image blog-post__inline-image--generic">
    <img src="http://cdn.static-economist.com/sites/default/files/images/print-edition/20170325_CNP002_0.jpg" alt="" title="" height="335" width="595" class=" blog-post-article-image"><figcaption>Let there be no confusion about Confucius</figcaption>
    </figure>
    
    Let there be no confusion about Confucius

    但是这张却没有(文章中间偏后的图表):

    <figure class="blog-post__inline-image blog-post__inline-image--generic blog-post__inline-image--slim">
    <img src="http://cdn.static-economist.com/sites/default/files/images/print-edition/20170325_CNC236.png" alt="" title="" height="598" width="580" class=" blog-post-article-image blog-post-article-image__slim">
    </figure>
    

    百思不得其解,还望指教。谢谢!

    opened by Steven630 15
  • Fix kf8 error

    Fix kf8 error

    1 增加了localization.py 原因是lib/calibre/ebooks/mobi/langcodes.py文件中引用了,但是没有该文件导致推送失败。 2 修改lib/calibre/ebooks/mobi/writer8/main.py 调用KF8Book的函数始终失败,原因不明,后来经过好几次尝试,加入了一个新参数oeb。 并在init中保存临时变量,才调用成功。 3 修改lib/calibre/ebooks/mobi/writer8/mobi.py 修改init函数,增加参数oeb,保存临时变量。 4 修改lib/calibre/ebooks/mobi/writer8/mobi.py iana2mobi函数调用失败,我实在看不懂,没有仔细查为什么。所以就根据函数内容简单写了个返回值,暂时可以成功推送。

    其实4的修改导致1没有必要添加了。但是少个文件肯定有问题,所以我保留了。

    opened by insert0003 14
  • 无法自动定时推送,手动推送则可用

    无法自动定时推送,手动推送则可用

    搜了一下好像有人跟我问题一样, https://github.com/cdhigh/KindleEar/issues/31

    gae的日志看不懂啊

    2014-03-27 18:43:43.230 /my 500 41ms 0kb Mozilla/5.0 (Windows NT 6.3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36 module=default version=1 E 2014-03-27 18:43:43.229 Traceback (most recent call last): E 2014-03-27 18:43:43.229 File "/base/data/home/apps/s~kindlexeeqing/1.374713553351548450/web/application.py", line 239, in process E 2014-03-27 18:43:43.229 return self.handle() E 2014-03-27 18:43:43.229 File "/base/data/home/apps/s~kindlexeeqing/1.374713553351548450/web/application.py", line 230, in handle E 2014-03-27 18:43:43.229 return self._delegate(fn, self.fvars, args) E 2014-03-27 18:43:43.229 File "/base/data/home/apps/s~kindlexeeqing/1.374713553351548450/web/application.py", line 420, in _delegate E 2014-03-27 18:43:43.229 return handle_class(cls) E 2014-03-27 18:43:43.229 File "/base/data/home/apps/s~kindlexeeqing/1.374713553351548450/web/application.py", line 396, in handle_class E 2014-03-27 18:43:43.229 return tocall(_args) E 2014-03-27 18:43:43.229 File "/base/data/home/apps/s~kindlexeeqing/1.374713553351548450/main.py", line 658, in GET E 2014-03-27 18:43:43.229 books=Book.all().filter("builtin = ",True),myfeeds=myfeeds,tips=tips) E 2014-03-27 18:43:43.229 File "/base/data/home/apps/s~kindlexeeqing/1.374713553351548450/main.py", line 311, in render E 2014-03-27 18:43:43.229 return jjenv.get_template(templatefile).render(title=title, *_kwargs) E 2014-03-27 18:43:43.229 File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/jinja2-2.6/jinja2/environment.py", line 894, in render E 2014-03-27 18:43:43.229 return self.environment.handle_exception(exc_info, True) E 2014-03-27 18:43:43.229 File "templates/my.html", line 1, in top-level template code E 2014-03-27 18:43:43.229 {% extends "base.html" %} E 2014-03-27 18:43:43.229 File "templates/base.html", line 75, in top-level template code E 2014-03-27 18:43:43.229 {% block content %} E 2014-03-27 18:43:43.229 File "templates/my.html", line 6, in block "content" E 2014-03-27 18:43:43.229 {% for feed in myfeeds -%} E 2014-03-27 18:43:43.229 File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/db/init.py", line 2326, in next E 2014-03-27 18:43:43.229 return self.__model_class.from_entity(self.__iterator.next()) E 2014-03-27 18:43:43.229 File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/datastore/datastore_query.py", line 2893, in next E 2014-03-27 18:43:43.229 next_batch = self.__batcher.next() E 2014-03-27 18:43:43.229 File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/datastore/datastore_query.py", line 2755, in next E 2014-03-27 18:43:43.229 return self.next_batch(self.AT_LEAST_ONE) E 2014-03-27 18:43:43.229 File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/datastore/datastore_query.py", line 2792, in next_batch E 2014-03-27 18:43:43.229 batch = self.__next_batch.get_result() E 2014-03-27 18:43:43.229 File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 612, in get_result E 2014-03-27 18:43:43.229 return self.__get_result_hook(self) E 2014-03-27 18:43:43.229 File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/datastore/datastore_query.py", line 2544, in __query_result_hook E 2014-03-27 18:43:43.229 yaml_index=yaml, xml_index=xml) E 2014-03-27 18:43:43.229 NeedIndexError: The index for this query is not ready to serve. See the Datastore Indexes page in the Admin Console. E 2014-03-27 18:43:43.229 The suggested index for this query is: E 2014-03-27 18:43:43.229 - kind: Feed E 2014-03-27 18:43:43.229 properties: E 2014-03-27 18:43:43.229 - name: book E 2014-03-27 18:43:43.229 - name: time

    opened by Xiiqiing 13
  • how can I add localisation for another language

    how can I add localisation for another language

    What should I do apart from adding reated files on i18n/tr to have a Turkish localisation for your app?

    also I need "Turkish" option on Custom RSS language settings. If possiible could you add it? if not then how could I add it to my copy? image

    opened by th0mass 12
  • 昨天突然提示no news

    昨天突然提示no news

    我有两个账号(一个默认的admin,另一个是半年要登陆一次的),都是每天同一时刻推送,一直很正常。昨天却只收到admin的推送,另一个没收到。于是看日志,说no news。但是这个推送有好几个rss源(即好几本书合并一起推送),我也检查过了,昨天rss源都正常更新,不可能无新闻可读取。设置是不显示图片,每次推送平均也就两三百KB,所以也不可能是文件太大。昨天、今天还手动推送了几次,也都提示no news。看了谷歌后台的记录,也无异常,不知道是为什么。我甚至删了几个rss源再推送,还是不行。admin账号昨天、今天都正常。总之百思不得其解,还烦请解惑。多谢!

    opened by Steven630 11
  • 404 page not found 问题的解决,供需要的朋友参考

    404 page not found 问题的解决,供需要的朋友参考

    按照https://bookfere.com/post/19.html#ke_4_3的自动化上传脚本安装。一直是404. 后来查看日志,提示构建错误“gcr.io/cloud-builders/gcloud" failed: step exited with non-zero status: 1”。 网上搜了搜,有一篇教程,提到类似错误,需要给GAE账号增加构建权限,详情见下方链接。供需要的朋友参考。 https://www.learngoogle.com/tag/cloudbuild/

    opened by shujianzhao 0
  • app.yaml seems invalid, please download KindleEar again.

    app.yaml seems invalid, please download KindleEar again.

    Ekran görüntüsü 2021-12-20 165902 when I try to start uploader.bat always getting error "app.yaml seems invalid, please download KindleEar again". could you help me about the situation?

    opened by magruderkvnc 1
  • 打开ofcoder.com的网页报Too many redirections错误

    打开ofcoder.com的网页报Too many redirections错误

    Too many redirections:https://www.ofcoder.com/2020/08/12/theory/分布式一致性协议 - ZAB/?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io

    我手工设置最大跳转次数到30也是一样 opener = URLOpener(self.host, timeout=self.timeout, maxredirect=30)

    用浏览器打开网页正常,而且好像没有跳转

    opened by hjianhao 3
  • 请教 对于提供了JSON但没有rss的网站,有简单抓取方法吗

    请教 对于提供了JSON但没有rss的网站,有简单抓取方法吗

    如题 我见一些网站提供了形如这样,非常工整的东西: https://api.guancha.cn/Appdata/NewsList/?newstype=0&size=10&page=1&type=2&id=ZhangWeiWei 但它并不能直接订阅 请教,有无可以简单的将它转为RSS的工具? 或者提供一个kindleear现成,转换类似链接的book,生搬硬套就能用的那种。(鄙人很菜,只看得懂html) 谢谢!

    opened by mlyksuu 1
Owner
null
First Party data integration solution built for marketing teams to enable audience and conversion onboarding into Google Marketing products (Google Ads, Campaign Manager, Google Analytics).

Megalista Sample integration code for onboarding offline/CRM data from BigQuery as custom audiences or offline conversions in Google Ads, Google Analy

Google 76 Dec 29, 2022
Bootstrapping your personal Web3 info hub from more than 500 RSS Feeds.

RSS Aggregator for Web3 (or ?? RAW for short) Bootstrapping your personal Web3 info hub from more than 500 RSS Feeds. What is RSS or Reader Services?

ChainFeeds 1.8k Dec 29, 2022
API to retrieve the number of grades on the OGE website (Website listing the grades of students) to know if a new grade is available. If a new grade has been entered, the program sends a notification e-mail with the subject.

OGE-ESIREM-API Introduction API to retrieve the number of grades on the OGE website (Website listing the grades of students) to know if a new grade is

Benjamin Milhet 5 Apr 27, 2022
null 5 Oct 19, 2022
A telegram bot to read RSS feeds

Telegram bot to fetch RSS feeds This is a telegram bot that fetches RSS feeds in regular intervals and send it to you. The feed sources can be added o

Santhosh Thottingal 14 Dec 15, 2022
A telegram mirror bot with an integrated RSS feed reader.

About What is this repo? This is a slightly modified fork which includes some extra features & memes added to my liking. How's this different from the

null 11 May 15, 2022
Spodcast is a caching Spotify podcast to RSS proxy

Spodcast Spodcast is a caching Spotify podcast to RSS proxy. Using Spodcast you can follow Spotify-hosted netcasts/podcasts using any player which sup

Frank de Lange 260 Jan 1, 2023
It's a Discord bot to control your PC using your Discord Channel or using Reco: Discord PC Remote Controller App.

Reco PC Server Reco PC Server is a cross platform PC Controller Discord Bot which is a modified and improved version of Chimera for Reco-Discord PC Re

Arvinth Krishna 12 Aug 31, 2022
domhttpx is a google search engine dorker with HTTP toolkit built with python, can make it easier for you to find many URLs/IPs at once with fast time.

domhttpx is a google search engine dorker with HTTP toolkit built with python, can make it easier for you to find many URLs/IPs at once with fast time

Naufal Ardhani 59 Dec 4, 2022
A Telegram bot to extracting text from images. All languages supported.

OCR Bot A Telegram bot to extracting text from images. All languages supported. Deploy to Heroku Local Deploying Clone the repo git clone https://gith

null 6 Oct 21, 2022
Kevin L. 3 Jul 14, 2022
Automation application was made by me using Google, Sheet and Slack APIs with Python.

README This application is used to transfer the data in the xlsx document we have to the Google Drive environment and calculate the "total budget" wit

null 3 Apr 12, 2022
Google scholar share - Simple python script to pull Google Scholar data from an author's profile

google_scholar_share Simple python script to pull Google Scholar data from an au

Paul Goldsmith-Pinkham 9 Sep 15, 2022
google-resumable-media Apache-2google-resumable-media (🥉28 · ⭐ 27) - Utilities for Google Media Downloads and Resumable.. Apache-2

google-resumable-media Utilities for Google Media Downloads and Resumable Uploads See the docs for examples and usage. Experimental asyncio Support Wh

Google APIs 36 Nov 22, 2022
An attendance bot that joins google meet automatically according to schedule and marks present in the google meet.

Google-meet-self-attendance-bot An attendance bot which joins google meet automatically according to schedule and marks present in the google meet. I

Sarvesh Wadi 12 Sep 20, 2022
Google Drive, OneDrive and Youtube as covert-channels - Control systems remotely by uploading files to Google Drive, OneDrive, Youtube or Telegram

covert-control Control systems remotely by uploading files to Google Drive, OneDrive, Youtube or Telegram using Python to create the files and the lis

Ricardo Ruiz 52 Dec 6, 2022
Easy Google Translate: Unofficial Google Translate API

easygoogletranslate Unofficial Google Translate API. This library does not need an api key or something else to use, it's free and simple. You can eit

Ahmet Eren Odacı 9 Nov 6, 2022
GG Dorking is a tool to generate GitHub and Google dorking for pentesters and bug bounty hunters.

GG-Dorking GG Dorking is a python tool to generate GitHub and Google dorking links for pentesters and bug bounty hunters. It will help you to find imp

Eslam Akl 80 Nov 24, 2022