-
Notifications
You must be signed in to change notification settings - Fork 555
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
1,221 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ jobs: | |
pip install -r requirements.txt | ||
- name: douban book sync | ||
run: | | ||
python -u scripts/douban.py "book" | ||
douban "book" | ||
- name: Remove folder | ||
run: rm -rf ./OUT_FOLDER/book | ||
- name: Set default year if not provided | ||
|
@@ -44,7 +44,7 @@ jobs: | |
github_heatmap notion --notion_token "${{ secrets.BOOK_NOTION_TOKEN || secrets.NOTION_TOKEN }}" --database_id "${{ env.DATABASE_ID }}" --date_prop_name "日期" --value_prop_name "读过" --unit "本" --year $YEAR --me "${{secrets.BOOK_NAME}}" --without-type-name --background-color=${{ vars.background_color||'#FFFFFF'}} --track-color=${{ vars.track_color||'#ACE7AE'}} --special-color1=${{ vars.special_color||'#69C16E'}} --special-color2=${{ vars.special_color2||'#549F57'}} --dom-color=${{ vars.dom_color||'#EBEDF0'}} --text-color=${{ vars.text_color||'#000000'}} | ||
- name: udpate heatmap | ||
run: | | ||
python -u scripts/update_heatmap.py "book" | ||
heatmap "book" | ||
- name: push | ||
run: | | ||
git config --local user.email "[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ jobs: | |
pip install -r requirements.txt | ||
- name: douban movie sync | ||
run: | | ||
python -u scripts/douban.py "movie" | ||
douban "movie" | ||
- name: Remove folder | ||
run: rm -rf ./OUT_FOLDER/movie | ||
- name: Set default year if not provided | ||
|
@@ -44,7 +44,7 @@ jobs: | |
github_heatmap notion --notion_token "${{secrets.MOVIE_NOTION_TOKEN || secrets.NOTION_TOKEN}}" --database_id "${{ env.DATABASE_ID }}" --date_prop_name "日期" --value_prop_name "看过" --unit "部" --year $YEAR --me "${{secrets.MOVIE_NAME}}" --without-type-name --background-color=${{ vars.background_color||'#FFFFFF'}} --track-color=${{ vars.track_color||'#ACE7AE'}} --special-color1=${{ vars.special_color||'#69C16E'}} --special-color2=${{ vars.special_color2||'#549F57'}} --dom-color=${{ vars.dom_color||'#EBEDF0'}} --text-color=${{ vars.text_color||'#000000'}} | ||
- name: udpate heatmap | ||
run: | | ||
python -u scripts/update_heatmap.py "movie" | ||
heatmap.py "movie" | ||
- name: push | ||
run: | | ||
git config --local user.email "[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
scripts/__pycache__/ | ||
douban2notion/__pycache__/ | ||
.env | ||
a |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from book import main | ||
|
||
if __name__ == "__main__": | ||
main() |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
Metadata-Version: 2.1 | ||
Name: douban2notion | ||
Version: 0.0.3 | ||
Summary: 自动将豆瓣电影和豆瓣读书同步到Notion | ||
Home-page: https://github.com/malinkang/weread2notion-pro | ||
Author: malinkang | ||
Author-email: [email protected] | ||
Classifier: Programming Language :: Python :: 3 | ||
Classifier: License :: OSI Approved :: MIT License | ||
Classifier: Operating System :: OS Independent | ||
Requires-Python: >=3.6 | ||
Description-Content-Type: text/markdown | ||
Requires-Dist: requests | ||
Requires-Dist: pendulum | ||
Requires-Dist: retrying | ||
Requires-Dist: notion-client | ||
Requires-Dist: github-heatmap | ||
Requires-Dist: python-dotenv | ||
|
||
# 将豆瓣电影和读书同步到Notion | ||
|
||
|
||
本项目通过Github Action每天定时同步豆瓣电影和读书到Notion。 | ||
|
||
* 豆瓣电影预览效果:https://douban-movie.malinkang.com/ | ||
* 豆瓣图书预览效果:https://douban-book.malinkang.com/ | ||
|
||
|
||
## 使用 | ||
|
||
> [!IMPORTANT] | ||
> 关注公众号回复豆瓣获取教程,后续有更新也会第一时间在公众号里同步。 | ||
|
||
![扫码_搜索联合传播样式-标准色版](https://github.com/malinkang/weread2notion/assets/3365208/191900c6-958e-4f9b-908d-a40a54889b5e) | ||
|
||
|
||
## 群 | ||
> [!IMPORTANT] | ||
> 欢迎加入群讨论。可以讨论使用中遇到的任何问题,也可以讨论Notion使用,后续我也会在群中分享更多Notion自动化工具。微信群失效的话可以添加我的微信malinkang,我拉你入群。 | ||
|
||
| 微信群 | QQ群 | | ||
| --- | --- | | ||
| <div align="center"><img src="https://github.com/malinkang/Podcast2Notion/assets/3365208/f38804e6-fe05-4754-9188-122a08e43fec" ></div> | <div align="center"><img src="https://images.malinkang.com/2024/04/b225b17d60670e4a6ff3459bbde80d28.jpg" width="50%"></div> | | ||
|
||
|
||
## 捐赠 | ||
|
||
如果你觉得本项目帮助了你,请作者喝一杯咖啡,你的支持是作者最大的动力。本项目会持续更新。 | ||
|
||
| 支付宝支付 | 微信支付 | | ||
| --- | --- | | ||
| <div align="center"><img src="https://images.malinkang.com/2024/03/7fd0feb1145f19fab3821ff1d4631f85.jpg" width="50%"></div> | <div align="center"><img src="https://images.malinkang.com/2024/03/d34f577490a32d4440c8a22f57af41da.jpg" width="50%"></div> | | ||
|
||
## 其他项目 | ||
* [WeRead2Notion-Pro](https://github.com/malinkang/weread2notion-pro) | ||
* [WeRead2Notion](https://github.com/malinkang/weread2notion) | ||
* [Podcast2Notion](https://github.com/malinkang/podcast2notion) | ||
* [Douban2Notion](https://github.com/malinkang/douban2notion) | ||
* [Keep2Notion](https://github.com/malinkang/keep2notion) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
README.md | ||
setup.py | ||
douban2notion/__init__.py | ||
douban2notion/__main__.py | ||
douban2notion/config.py | ||
douban2notion/douban.py | ||
douban2notion/notion_helper.py | ||
douban2notion/update_heatmap.py | ||
douban2notion/utils.py | ||
douban2notion.egg-info/PKG-INFO | ||
douban2notion.egg-info/SOURCES.txt | ||
douban2notion.egg-info/dependency_links.txt | ||
douban2notion.egg-info/entry_points.txt | ||
douban2notion.egg-info/requires.txt | ||
douban2notion.egg-info/top_level.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[console_scripts] | ||
douban = douban2notion.douban:main | ||
heatmap = douban2notion.upadte_heatmap:main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
requests | ||
pendulum | ||
retrying | ||
notion-client | ||
github-heatmap | ||
python-dotenv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
douban2notion |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from book import main | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
|
||
RICH_TEXT = "rich_text" | ||
URL = "url" | ||
RELATION = "relation" | ||
NUMBER = "number" | ||
DATE = "date" | ||
FILES = "files" | ||
STATUS = "status" | ||
TITLE = "title" | ||
SELECT = "select" | ||
MULTI_SELECT = "multi_select" | ||
|
||
book_properties_type_dict = { | ||
"书名":TITLE, | ||
"短评":RICH_TEXT, | ||
"ISBN":RICH_TEXT, | ||
"豆瓣链接":URL, | ||
"作者":RELATION, | ||
"评分":SELECT, | ||
"封面":FILES, | ||
"分类":RELATION, | ||
"状态":STATUS, | ||
"日期":DATE, | ||
"简介":RICH_TEXT, | ||
"豆瓣链接":URL, | ||
"出版社":MULTI_SELECT, | ||
} | ||
|
||
TAG_ICON_URL = "https://www.notion.so/icons/tag_gray.svg" | ||
USER_ICON_URL = "https://www.notion.so/icons/user-circle-filled_gray.svg" | ||
BOOK_ICON_URL = "https://www.notion.so/icons/book_gray.svg" | ||
|
||
|
||
movie_properties_type_dict = { | ||
"电影名":TITLE, | ||
"短评":RICH_TEXT, | ||
# "ISBN":RICH_TEXT, | ||
# "链接":URL, | ||
"导演":RELATION, | ||
"演员":MULTI_SELECT, | ||
# "Sort":NUMBER, | ||
"封面":FILES, | ||
"分类":RELATION, | ||
"状态":STATUS, | ||
"类型":SELECT, | ||
"评分":SELECT, | ||
# "阅读时长":NUMBER, | ||
# "阅读进度":NUMBER, | ||
# "阅读天数":NUMBER, | ||
"日期":DATE, | ||
"简介":RICH_TEXT, | ||
# "开始阅读时间":DATE, | ||
# "最后阅读时间":DATE, | ||
# "简介":RICH_TEXT, | ||
# "书架分类":SELECT, | ||
# "我的评分":SELECT, | ||
"豆瓣链接":URL, | ||
} |
Oops, something went wrong.