Skip to content

Commit

Permalink
v3.2
Browse files Browse the repository at this point in the history
Add article summarizer
  • Loading branch information
cdhigh committed Nov 19, 2024
1 parent b493994 commit e2d2c2d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 13 deletions.
3 changes: 2 additions & 1 deletion application/lib/ebook_summarizer/html_summarizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ def summarize_soup(self, soup, chunkSize=None, maxIterations=5):
default_log.info(loc_exc_pos('Error in summarize_soup'))
return

if (i < iterNum) and (interval > 0.01):
#if (i < iterNum) and (interval > 0.01):
if interval > 0.01: #最后一个请求还是需要延时,否则下一篇文章的首次请求可能失败
time.sleep(interval)

#将摘要插在文章标题之后
Expand Down
7 changes: 5 additions & 2 deletions application/lib/ebook_translator/html_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def translate_text(self, data):

count = len(data)
ret = []
interval = self.translator.request_interval
for idx, item in enumerate(data, 1):
text = item['text']
item['error'] = ''
Expand All @@ -65,8 +66,10 @@ def translate_text(self, data):
else:
item['error'] = _('The input text is empty')
ret.append(item)
if (idx < count) and (self.translator.request_interval > 0.01):
time.sleep(self.translator.request_interval)
#if (idx < count) and (interval > 0.01):
#最后一个请求还是需要延时,否则下一篇文章的首次请求可能失败
if interval > 0.01:
time.sleep(interval)

if retList:
return ret
Expand Down
7 changes: 5 additions & 2 deletions application/lib/ebook_tts/html_audiolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def audiofy_text(self, data):

count = len(data)
ret = []
interval = self.audiolator.request_interval
for idx, item in enumerate(data, 1):
text = item['text']
item['error'] = ''
Expand All @@ -52,8 +53,10 @@ def audiofy_text(self, data):
else:
item['error'] = _('The input text is empty')
ret.append(item)
if (idx < count) and (self.audiolator.request_interval > 0.01):
time.sleep(self.audiolator.request_interval)
#if (idx < count) and (interval > 0.01):
#最后一个请求还是需要延时,否则下一篇文章的首次请求可能失败
if interval > 0.01:
time.sleep(interval)

if retList:
return ret
Expand Down
9 changes: 5 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ __English__ · [简体中文](readme_zh.md)



[Demo site1](https://kindleear.koyeb.app/)
[Demo site2](https://kindleear.onrender.com/)
Note: These demo sites are free services hosted on Koyeb/Render. It may take around 50 seconds for the **Render** demo site to start up the first time you open it. The login username and password are `admin/admin`. All data will be automatically cleared after a period of inactivity, so feel free to perform any operations. You can use it to test ebook pushing.
[Demo site](https://kindleear.koyeb.app/)
Note: The demo site is a free service hosted on Koyeb. The login username and password are `admin/admin`. All data will be automatically cleared after a period of inactivity, so feel free to perform any operations. You can use it to test ebook pushing.



# Announcement
June 1, 2024 **Release of KindleEar 3.1, includes an online reader optimized for e-ink (Docker only).**
Nov 19, 2024 **Release of KindleEar 3.2, featuring an AI-driven article summarizer.**
Api Gemini/Grok/Mistral/Groq are free to use by now.

**Significant Updates:**
* Full support for Python 3
Expand All @@ -22,6 +22,7 @@ June 1, 2024 **Release of KindleEar 3.1, includes an online reader optimized fo
* Support email delivery and online reading (Docker version), built-in online reader optimized for e-ink screens
* Support for Calibre's recipe format without the need for modification
* Built-in library of over a thousand Calibre recipe files
* AI-driven summaries to help you stay updated on news in less time
* Integrated bilingual translation feature, breaking language barriers for effortless information retrieval and language learning
* Built-in text-to-speech functionality, transforming daily news into audio for easy consumption without reading
* Includes a browser extension, enabling effortless creation of web scraping recipe without coding, facilitating seamless content delivery from any website (brag)
Expand Down
9 changes: 5 additions & 4 deletions readme_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
**[项目文档](https://cdhigh.github.io/KindleEar)**


[体验站点1](https://kindleear.koyeb.app/)
[体验站点2](https://kindleear.onrender.com/)
注:体验站点是在koyeb/render上搭建的免费服务,render第一次打开会大约有50s的启动时间,登录账号密码为 `admin/admin`,一段时间不活动后所有数据会被自动清除,所以可以大胆放心的进行任何操作,你可以进行电子书推送测试。
[体验站点](https://kindleear.koyeb.app/)
注:体验站点是在koyeb上搭建的免费服务,登录账号密码为 `admin/admin`,一段时间不活动后所有数据会被自动清除,所以可以大胆放心的进行任何操作,你可以进行电子书推送测试。



2024-06-01 **KindleEar 3.1 版本发布,新增一个为墨水屏特别优化的在线阅读器(仅Docker版本)**
2024-11-19 **KindleEar 3.2 版本发布,新增AI驱动的总结文章摘要功能**
现在 Gemini/Grok/Mistral/Groq 的API都是可以免费使用的。

**主要新特性:**
* 全面支持Python 3
Expand All @@ -20,6 +20,7 @@
* 支持邮件推送和在线阅读(仅Docker版本),内置专门为电子墨水屏优化的在线阅读器
* 支持 Calibre 的 recipe 格式,无需修改
* 内置一千多个 Calibre recipe 文件
* 包含AI驱动的总结文章摘要功能,用更少的时间了解更多的新闻
* 内置双语对照翻译功能,突破语言壁垒,轻松获取信息和学习外语
* 内置文本转语音功能,将每日新闻转化为声音,让您无需阅读,也能轻松获取信息
* 包含浏览器扩展程序,无需编码即可制作爬虫脚本,便捷推送任意网站(虚假宣传)
Expand Down

0 comments on commit e2d2c2d

Please sign in to comment.