notionctl

command module
v0.0.0-...-2d85ce1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 1 Imported by: 0

README

notionctl

A toy notion cli

Go Report Card CI

Installation

go install github.com/szktkfm/notionctl...

Usage

Create a Notion Integration. Refer https://developers.notion.com/docs.

Set the API key and the ID of the Database to be integrated into an environment variable.

export NOTION_API_KEY=<your notion api key>
export NOTION_DATABASE=<integrated db id>

You can display the values from the Database in a table-like format as follows

$ notionctl get
NAME               AGE     FOOD GROUP    TAGS     DESCRIPTION
Mandarin orange    5d4h    Fruit         -        small citrus tree fruit
Tuscan Kale        32d     Vegetable     salad    A dark green leafy veget

You can create pages in the database from markdown files or raw text.

$ notionctl push --title readme --file readme.md

$ notionctl push --title todo --description "Buy toothpaste."

$ cat <<EOF | notionctl --title todo --file -
Buy toothpaste.
EOF

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL