GithubHelp home page GithubHelp logo

k-gen / nextion Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 75asa/nextion

0.0 0.0 0.0 797 KB

Pick a page at random in Notion.

License: MIT License

TypeScript 96.67% Shell 0.48% JavaScript 2.85%

nextion's Introduction

Nextion

This is a Notion Integration to pick a next page at random for a Notion Database.

Github issues Github forks Github stars Github top language Github license

Nextion-logo

README: JP ๐Ÿ‡ฏ๐Ÿ‡ต

How to use

  1. click here to get a Notion API key.
  2. set environment value to each use case. below section is for local & GitHub Actions.
  3. confirm your Notion Database property setting. by default, it's defined constant values on src/Config.ts. if you wanna change key or value, you can change it.
  4. confirm cron job setting. by default, it's defined constant expression values on github/workflows/{chooseNext, watchDone, fetchIcon}.yaml
    • chooseNext: '*/1 * * * *'
    • watchDone: '*/10 * * * *'
    • fetchIcon: '*/1 * * * *'

How to set environment value

When using on Local

  1. $ cp .env.example .env
  2. set each environmental value.

When using on GitHub Actions

  1. fork or clone this repository.(highly recommend fork)
  2. move your repository Secrets settings and add your secret.

FYI: Encrypted secrets

sample images see below.

GitHub Actions Secrets

Notes

Spec

Choose Next

  1. get all pages from database
  2. group by status in use case
  3. if nobody empty Status, nothing to do
  4. randomly select one of the pages with empty Status and set its status to NEXT.

Watch Done

  1. get all pages from database
  2. group by status in use case
  3. if at least exist empty Status, nothing to do
  4. set all done pages status to empty

Fetch Icon

  1. get all pages from a database
  2. get icon url from a assign (person property type on Notion)
  3. set page cover with icon url

FYI

Contributors

nextion's People

Contributors

75asa avatar k-gen 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.