4
GitHub - lizheming/doumark-action: Douban movie/book/music marked data sync GitH...
source link: https://github.com/lizheming/doumark-action
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Douban sync for GitHub Actions
GitHub Action for douban movie/book/music marked data sync to csv file or notion automatically.
Input variables
See action.yml for more detailed information.
- id: Douban ID
- type: Douban data Type, enum value: movie, book, music, default
movie
- format: Douban data store format, enum value:csv, json, notion, default
csv
- dir: Target where douban data sync to. It's a file path for
csv
andjson
format, and a notion database id fornotion
format. - notion_token: Notion Integration Token
Usage
Sync to CSV file
# .github/workflows/douban.yml
name: douban
on:
schedule:
- cron: "30 * * * *"
jobs:
douban:
name: Douban mark data sync
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: movie
uses: lizheming/doumark-action@master
with:
id: lizheming
type: movie
format: csv
dir: ./data/douban
- name: music
uses: lizheming/doumark-action@master
with:
id: lizheming
type: music
format: csv
dir: ./data/douban
- name: Commit
uses: EndBug/add-and-commit@v8
with:
message: 'chore: update douban data'
add: './data/douban'
Sync to Notion
- Create a Notion Integration at My Integrations - Notion. And here you can get
NOTION_TOKEN
.- Associated workspace: You should select workspace which you should store.
- Capabilities: Both of
Read
,Update
andInsert
content abilities shoud checked.
- Duplicate database by click Duplicate at the top right postion of <Movie | Book | Music> page.
- Share database to your Integration by inviting it with Share - Invite at the top right postion. And you can get database id, the first random string from url.
# .github/workflows/douban.yml
name: douban
on:
schedule:
- cron: "30 * * * *"
jobs:
douban:
name: Douban mark data sync
runs-on: ubuntu-latest
steps:
- name: movie
uses: lizheming/doumark-action@master
with:
id: lizheming
type: movie
format: notion
dir: xxxx
notion_token: ${{ secrets.notion_token }}
- name: music
uses: lizheming/doumark-action@master
with:
id: lizheming
type: music
format: notion
dir: xxxx
notion_token:
notion_token: ${{ secrets.notion_token }}
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK