Giter Club home page Giter Club logo

drone-doumark's Introduction

drone-doumark

Build Status

Drone plugin for Douban movie/book/music marked data sync automatically.

Configuration

  • PLUGIN_ID: Douban ID
  • DOUBAN_ID: Same as PLUGIN_ID
  • PLUGIN_TYPE: Douban data Type, enum value: movie, book, music, default movie
  • DOUBAN_TYPE: Same as PLUGIN_TYPE
  • PLUGIN_FORMAT: Douban data store format, enum value:csv, json, notion, default csv
  • DOUBAN_FORMAT: Same as PLUGIN_FORMAT
  • PLUGIN_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.
  • DOUBAN_DIR: Same as PLUGIN_DIR
  • PLUGIN_NOTION_TOKEN: Notion Integration Token
  • DOUBAN_NOTION_TOKEN: Same as PLUGIN_NOTION_TOKEN
  • NOTION_TOKEN: Same as PLUGIN_NOTION_TOKEN

How to use

Sync to CSV file

Copy as .drone.yml file into your repo. Then set a @houly schedule cronjob at drone web page.

# .drone.yml
kind: pipeline
type: docker
name: default

clone:
  disable: true

steps:
- name: douban
  image: lizheming/drone-doumark
  settings:
    id: lizheming
    type: movie
    format: csv
    dir: ./data/douban

RUN with docker directly:

docker run --rm \
  -e PLUGIN_ID=lizheming
  -e PLUGIN_TYPE=movie
  -e PLUGIN_FORMAT=csv
  -e PLUGIN_DIR=./data/douban
  lizheming/drone-doumark

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.
  4. Copy as .drone.yml file into your repo. Then set a @houly schedule cronjob at drone web page.
# .drone.yml
kind: pipeline
type: docker
name: default

clone:
  disable: true

steps:
- name: douban
  image: lizheming/drone-doumark
  settings:
    id: lizheming
    type: movie
    format: notion
    notion_token: xxxxxx
    dir: xxxxxx

RUN with docker directly:

docker run --rm \
  -e PLUGIN_ID=lizheming
  -e PLUGIN_TYPE=movie
  -e PLUGIN_FORMAT=notion
  -e PLUGIN_NOTION_TOKEN=xxxxxx
  -e PLUGIN_DIR=xxxxxx
  lizheming/drone-doumark

drone-doumark'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.