Skip to content

75asa/Nextion

Repository files navigation

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

About

Pick a page at random in Notion.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published