Git Product home page Git Product logo

doumark-action's Introduction

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, game default movie
  • status: Douban data status, enum value: mark, doing, done, default done
  • format: Douban data store format, enum value:csv, json, notion, neodb default csv
  • dir: Target where douban data sync to. It's a file path for csv and json format, and a notion database id for notion format.
  • notion_token: Notion Integration Token
  • neodb_token: NeoDB Access 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

  1. 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 and Insert content abilities shoud checked.
  2. Duplicate database by click Duplicate at the top right postion of <Movie | Book | Music> page.
  3. 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: ${{ secrets.notion_token }}

Sync to NeoDB

  1. Create a NeoDB Access Token at NeoDB API Developer Console.
# .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: neodb
        neodb_token: ${{ secrets.neodb_token }}
        
    - name: music
      uses: lizheming/doumark-action@master
      with:
        id: lizheming
        type: music
        format: neodb
        neodb_token: ${{ secrets.neodb_token }}

doumark-action's People

Contributors

lizheming avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.