-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
0 parents
commit cabaa71
Showing
17 changed files
with
1,240 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: weread sync | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
jobs: | ||
sync: | ||
name: Sync | ||
runs-on: ubuntu-latest | ||
env: | ||
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }} | ||
BOOK_DATABASE_ID: ${{ secrets.BOOK_DATABASE_ID }} | ||
AUTHOR_DATABASE_ID: ${{ secrets.AUTHOR_DATABASE_ID }} | ||
CATEGORY_DATABASE_ID: ${{ secrets.CATEGORY_DATABASE_ID }} | ||
BOOKMARK_DATABASE_ID: ${{ secrets.BOOKMARK_DATABASE_ID }} | ||
REVIEW_DATABASE_ID: ${{ secrets.REVIEW_DATABASE_ID }} | ||
CHAPTER_DATABASE_ID: ${{ secrets.CHAPTER_DATABASE_ID }} | ||
YEAR_DATABASE_ID: ${{ secrets.YEAR_DATABASE_ID }} | ||
WEEK_DATABASE_ID: ${{ secrets.WEEK_DATABASE_ID }} | ||
MONTH_DATABASE_ID: ${{ secrets.MONTH_DATABASE_ID }} | ||
DAY_DATABASE_ID: ${{ secrets.DAY_DATABASE_ID }} | ||
WEREAD_COOKIE: ${{ secrets.WEREAD_COOKIE }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: read time sync | ||
run: | | ||
python -u scripts/read_time.py |
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,48 @@ | ||
name: weread sync | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
jobs: | ||
sync: | ||
name: Sync | ||
runs-on: ubuntu-latest | ||
env: | ||
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }} | ||
BOOK_DATABASE_ID: ${{ secrets.BOOK_DATABASE_ID }} | ||
AUTHOR_DATABASE_ID: ${{ secrets.AUTHOR_DATABASE_ID }} | ||
CATEGORY_DATABASE_ID: ${{ secrets.CATEGORY_DATABASE_ID }} | ||
BOOKMARK_DATABASE_ID: ${{ secrets.BOOKMARK_DATABASE_ID }} | ||
REVIEW_DATABASE_ID: ${{ secrets.REVIEW_DATABASE_ID }} | ||
CHAPTER_DATABASE_ID: ${{ secrets.CHAPTER_DATABASE_ID }} | ||
YEAR_DATABASE_ID: ${{ secrets.YEAR_DATABASE_ID }} | ||
WEEK_DATABASE_ID: ${{ secrets.WEEK_DATABASE_ID }} | ||
MONTH_DATABASE_ID: ${{ secrets.MONTH_DATABASE_ID }} | ||
DAY_DATABASE_ID: ${{ secrets.DAY_DATABASE_ID }} | ||
WEREAD_COOKIE: ${{ secrets.WEREAD_COOKIE }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: weread sync | ||
run: | | ||
python -u scripts/weread.py "${{ github.ref }}" "${{ github.repository }}" | ||
- name: weread heatmap | ||
run: | | ||
github_heatmap weread --weread_cookie "${{secrets.WEREAD_COOKIE}}" --year 2018-2023 --me "${{secrets.NAME}}" --with-animation --background-color=#ffffff --track-color=#ACE7AE --special-color1=#69C16E --special-color2=#549F57 --dom-color=#EBEDF0 --text-color=#000000 | ||
- name: push | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add . | ||
git commit -m 'add new cover' || echo "nothing to commit" | ||
git push || echo "nothing to push" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,48 @@ | ||
# 将微信读书划线和笔记同步到Notion | ||
|
||
|
||
本项目通过Github Action每天定时同步微信读书划线到Notion。 | ||
|
||
预览效果:https://book.malinkang.com | ||
|
||
> [!WARNING] | ||
> 请不要在Page里面添加自己的笔记,有新的笔记的时候会删除原笔记重新添加。 | ||
|
||
## 使用 | ||
|
||
使用文档:https://malinkang.com/posts/weread2notion/ | ||
|
||
热力图使用文档:https://malinkang.com/posts/github_heatmap/ | ||
|
||
## 捐赠 | ||
|
||
如果你觉得本项目帮助了你,请作者喝一杯咖啡,你的支持是作者最大的动力。本项目会持续更新。 | ||
|
||
 | ||
|
||
## 问题解答 | ||
|
||
1. 如果发现数据没有同步,请点击Action查看运行状态。红色表示失败,绿色代表成功,如果有失败的点击去查看详情,检查值是否填写正确 | ||
2. Categories is expected to be select. 这个是模板设置的问题,将模板中的Categories修改为Multi-select类型 | ||
3. 模板中的属性解释 | ||
* BookName:书名 | ||
* BookId:书Id | ||
* Sort:主要用于增量同步没啥实际意义 | ||
* Cover:封面 | ||
* Author:作者 | ||
* Status:状态 | ||
* ReadingTime:阅读时长 | ||
* Date:读完日期 | ||
* Rating:评分 | ||
* URL:网页链接 | ||
* Categories:分类 | ||
* Progress:阅读进度 | ||
|
||
|
||
## 微信群 | ||
> [!WARNING] | ||
> 微信群已满,加我备注微信读书,我拉你进群。 | ||
> 也可以加TG群:https://t.me/wereadnotion | ||
 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
requests | ||
notion-client | ||
github-heatmap | ||
retrying |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.