Git Product home page Git Product logo

kibela-group-set's Introduction

kibela-group-set

KibelaのAPIを利用して、特定のフォルダ内の全記事を指定したグループに公開するという機能を提供します。

使い方

  1. 変数の用意

    curl -sSL -o kibela-group-set.env https://raw.githubusercontent.com/nisshiee/kibela-group-set/master/.env.sample
    vi kibela-group-set.env

    ※ 各変数の詳細は後述

  2. Docker Containerを実行

    docker run --env-file kibela-group-set.env nisshiee/kibela-group-set

変数について

  • KIBELA_TEAM

    kibela-group-setを利用するKibelaのチームを指定します。

    https://${KIBELA_TEAM}.kibe.la/ ←KibelaURLのこの部分に一致します。

  • KIBELA_TOKEN

    Kibela Web APIの認証に利用するトークンです。以下のURLから取得してください。

    https://${KIBELA_TEAM}.kibe.la/settings/access_tokens

    readwriteの両権限が必要です。

  • KIBELA_TARGET_FOLDER_ID

    この変数で指定したフォルダ以下の全記事が対象になります。子フォルダ以下も再帰的に対象にします。

    このIDはAPIで使用する専用のIDを指定する必要があります。Web API Consoleを開き、以下のクエリを実行してIDを取得してください。

    Web API Console: https://${KIBELA_TEAM}.kibe.la/api/console

    query {
      folders(first: 100) {
        nodes {
          id
          fullName
        }
      }
    }
    
  • KIBELA_TARGET_GROUP_ID

    この変数で指定したグループに向けて、対象の記事を公開します。

    このIDはAPIで使用する専用のIDを指定する必要があります。Web API Consoleを開き、以下のクエリを実行してIDを取得してください。

    Web API Console: https://${KIBELA_TEAM}.kibe.la/api/console

    query {
      groups(first: 100) {
        nodes {
          id
          name
        }
      }
    }
    

開発のしかた

  • Go 1.12以降を想定しています
  • Go Modulesを使用しています
    • export GO111MODULE=on が必要かもしれません
    • 詳細はこちら
git clone https://github.com/nisshiee/kibela-group-set.git
cd kibela-group-set
go build *.go

kibela-group-set's People

Contributors

nisshiee avatar

Watchers

 avatar

kibela-group-set's Issues

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.