前言

为什么开发这个工具

Features

获取Notion的Token

Untitled

Untitled

Untitled

这个模板的原理

Untitled

Untitled

属性 描述
Title 订阅源的标题,如果没有会在下次更新中爬取页面的标题
Link 订阅链接
Enabled 是否开启爬取,勾选上为开启,作为过滤条件,工具只会获取勾选上的订阅
Proxy 是否使用代理,如果本机网络不通,可以在启动程序的时候指定 --proxy参数,支持http和socks
Status 状态:Pinding,Done,Error三种,分别为正在爬取,已经完成爬取,爬取错误(在Log中展示)
Type 分类:可以自己改
Last Update 最后更新时间,爬取完成后会更新为当前时间,用于和Hour,现在时间相比较,计算Skip
Hour 爬取时间间隔,单位小时,空为没有间隔,取决与程序的执行频率
Skip 是否跳过当次爬取,算法为:当前时间和最后更新时间大于等于Hour,就为假,即离上次更新时间超过了时间间隔,不跳过,需要更新。
Log 当爬取出现错误时,展示错误信息。
ForeignKey 都叫外键,和文章的关联关系

Untitled

属性 描述
Title 文章的标题
Link 文章链接
Description 描述
Published Time 是这篇文章的发布文章
Last Update 最后更新时间,爬取完成后会更新为当前时间
Read 已读标志
Today 是否为今天发布的文章
SourceTags 订阅源的分类
Tags 文章自己的分类
ForeignKey 都叫外键,和订阅源的关联关系

复制模板

Untitled

Untitled

获取archive-id和source-id

Untitled

<https://www.notion.so/kali-team/8a49af585aa844208ee085b3814e1a0d?v=119572bf5bc3420f9e5b1a9f0b5af0fb>
<https://www.notion.so/{database_id}?v={view_id}>

Untitled

安装程序

Untitled

➜  ~ ./notion-rss --notion-token secret_LdYDUloP20Xnfjrc06v6jWNJ0q8Tx6RIkHqjuehckGC --source-id 8a49af585aa844208ee085b3814e1a0d --archive-id e8f7df1fe33242a88adad7bdd793cd1e

███╗   ██╗ ██████╗ ████████╗██╗ ██████╗ ███╗   ██╗      ██████╗ ███████╗███████╗
████╗  ██║██╔═══██╗╚══██╔══╝██║██╔═══██╗████╗  ██║      ██╔══██╗██╔════╝██╔════╝
██╔██╗ ██║██║   ██║   ██║   ██║██║   ██║██╔██╗ ██║█████╗██████╔╝███████╗███████╗
██║╚██╗██║██║   ██║   ██║   ██║██║   ██║██║╚██╗██║╚════╝██╔══██╗╚════██║╚════██║
██║ ╚████║╚██████╔╝   ██║   ██║╚██████╔╝██║ ╚████║      ██║  ██║███████║███████║
╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝ ╚═╝  ╚═══╝      ╚═╝  ╚═╝╚══════╝╚══════╝
Build your own RSS Feeds in Notion.
________________________________________________
:  <https://github.com/cn-kali-team/notion-rss>  :
:  <https://blog.kali-team.cn/donate>            :
 -----------------------------------------------

Update configuration file to "/home/kali-team/.config/notion-rss/config.yaml"
Complete all updates.

2023-02-19_10-50.png

从文件添加订阅源

➜  ~ ./notion-rss --notion-token secret_LdYDUloP20Xnfjrc06v6jWNJ0q8Tx6RIkHqjuehckGC --source-id 8a49af585aa844208ee085b3814e1a0d --archive-id e8f7df1fe33242a88adad7bdd793cd1e
 --file feed.txt 

███╗   ██╗ ██████╗ ████████╗██╗ ██████╗ ███╗   ██╗      ██████╗ ███████╗███████╗
████╗  ██║██╔═══██╗╚══██╔══╝██║██╔═══██╗████╗  ██║      ██╔══██╗██╔════╝██╔════╝
██╔██╗ ██║██║   ██║   ██║   ██║██║   ██║██╔██╗ ██║█████╗██████╔╝███████╗███████╗
██║╚██╗██║██║   ██║   ██║   ██║██║   ██║██║╚██╗██║╚════╝██╔══██╗╚════██║╚════██║
██║ ╚████║╚██████╔╝   ██║   ██║╚██████╔╝██║ ╚████║      ██║  ██║███████║███████║
╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝ ╚═╝  ╚═══╝      ╚═╝  ╚═╝╚══════╝╚══════╝
Build your own RSS Feeds in Notion.
________________________________________________
:  <https://github.com/cn-kali-team/notion-rss>  :
:  <https://blog.kali-team.cn/donate>            :
 -----------------------------------------------

Update configuration file to "/home/kali-team/.config/notion-rss/config.yaml"
Submitted Successfully: <https://blog.kali-team.cn/index.xml>.
Update succeeded:  [Title:Kali-Team]  [Link:Some("<https://blog.kali-team.cn/index.xml>")]  [Status:Done] 
➜  ~ cat feed.txt 
<https://blog.kali-team.cn/index.xml>

Untitled

开启服务

➜  ~ ./notion-rss --notion-token secret_LdYDUloP20Xnfjrc06v6jWNJ0q8Tx6RIkHqjuehckGC --source-id 8a49af585aa844208ee085b3814e1a0d --archive-id e8f7df1fe33242a88adad7bdd793cd1e --api-server 127.0.0.1:8080 --token 21a2b7047d4de8076de462724daf8f8f     

███╗   ██╗ ██████╗ ████████╗██╗ ██████╗ ███╗   ██╗      ██████╗ ███████╗███████╗
████╗  ██║██╔═══██╗╚══██╔══╝██║██╔═══██╗████╗  ██║      ██╔══██╗██╔════╝██╔════╝
██╔██╗ ██║██║   ██║   ██║   ██║██║   ██║██╔██╗ ██║█████╗██████╔╝███████╗███████╗
██║╚██╗██║██║   ██║   ██║   ██║██║   ██║██║╚██╗██║╚════╝██╔══██╗╚════██║╚════██║
██║ ╚████║╚██████╔╝   ██║   ██║╚██████╔╝██║ ╚████║      ██║  ██║███████║███████║
╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝ ╚═╝  ╚═══╝      ╚═╝  ╚═╝╚══════╝╚══════╝
Build your own RSS Feeds in Notion.
________________________________________________
:  <https://github.com/cn-kali-team/notion-rss>  :
:  <https://blog.kali-team.cn/donate>            :
 -----------------------------------------------

Update configuration file to "/home/kali-team/.config/notion-rss/config.yaml"
Copy the URL to your RssHub browser plug-in configuration
Configure any of the following
[Tiny Tiny RSS, Miniflux, FreshRSS, Nextcloud News, InoReader, FeedBin]
API service has been started: <http://127.0.0.1:8080/21a2b7047d4de8076de462724daf8f8f/>
Update succeeded:  [Title:Kali-Team]  [Link:Some("<https://blog.kali-team.cn/index.xml>")]  [Status:Done]

兼容RssHub

Untitled

Untitled

Untitled

mmexport1676778434666.jpg

Window用户

Untitled

C:\\>notion-rss.exe --config default

参考

https://github.com/cn-kali-team/notion-rss

Powered by Kali-Team