This script is currently in progress.
<aside>
💡 This command assumes that the enviroment variable NOTION_API_KEY
contains your integration key. Please set this environment variable before execution.
# bash, zsh
export NOTION_API_KEY=secret_..........
# fish
set -gx NOTION_API_KEY secret_.......
</aside>
erdToNotionDb.rb
creates Notion databases from ER diagrams in mermaid code block. At first, you invite your integration to your pages
After inviting, please type command as follows.
# Pattern1: use id
erdToNotionDb.rb code_block_id page_id --inline
Example:
erdToNotionDb.rb e6e0e92965f046e7b383fac6dea4590f 87e5e52a6b9f46abbdeebcb3c902a516 --inline
# Pattern2: use url (needs "")
erdToNotionDb.rb "<https://www.notion.so/hkob/erdToNotionDb-sample-87e5e52a6b9f46abbdeebcb3c902a516#e6e0e92965f046e7b383fac6dea4590f>" "<https://www.notion.so/hkob/erdToNotionDb-sample-87e5e52a6b9f46abbdeebcb3c902a516>" --inline
erDiagram
If you run the script in this state, it will be like this.
erDiagram
db1 {
Database title "Task database"
title Name
}
<aside> ⚒️ Created database
</aside>