<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>
notionErDiagram.rb
creates ER diagrams to a codeblock from your Notion database. After inviting your integration to your databases, please type the following command.
# Pattern1: use id
notionErDiagram.rb database_id code_block_id
Example:
notionErDiagram.rb 06915e565005487baea5a8a7550991cd 7daea26b52d04d1bb79cf452da7f35c9
# Pattern2: use url (requre quote)
notionErDiagram.rb "database_url" "code_block_url"
Example:
notionErDiagram.rb "<https://www.notion.so/hkob/06915e565005487baea5a8a7550991cd?v=d9485754c9424d60aa54a2ce141f2e15>" "<https://www.notion.so/hkob/Irish-tunes-in-youtube-bf69c69a0bd547d1820b1585360b980d#7daea26b52d04d1bb79cf452da7f35c9>"
erDiagram
Irish_YouTubes {
Url p0 "URL"
RichText p1 "Description"
Date p2 "Uploaded"
Formula p3 "Thumbnail URL (copy to Thumbnail)"
MultiSelect p4 "Insturumentals"
Formula p5 "TypeStr"
LastEditedTime p6 "最終更新日"
Files p7 "Thumbnail"
Rollup p8 "Rhythm"
Title p9 "Name"
}
Irish_YouTubes ||--o{ Irish_Musicians : r0
Irish_YouTubes ||--o{ Irish_Tunes : r1
Irish_Musicians {
Rollup p0 "Number of Recordings"
MultiSelect p1 "Instrumentals"
Rollup p2 "Number of YouTubes"
Rollup p3 "Number of Albums"
Title p4 "名前"
}
Irish_Musicians ||--o{ Irish_YouTubes : r0
Irish_Musicians ||--o{ Irish_Recordings : r1
Irish_Musicians ||--o{ Irish_Albums : r2
Irish_Tunes {
MultiSelect p0 "Rhythm"
Rollup p1 "Musicians (YouTubes)"
Rollup p2 "Musicians (Recordings)"
Url p3 "The session link"
Rollup p4 "Albums"
Title p5 "Name"
}
Irish_Tunes ||--o{ Irish_YouTubes : r0
Irish_Tunes ||--o{ Irish_Recordings : r1
Irish_Recordings {
Url p0 "Apple Music"
Rollup p1 "RecordingsOnSameAlbum"
Number p2 "Number"
Title p3 "Name"
}
Irish_Recordings ||--o{ Irish_Tunes : r0
Irish_Recordings ||--o{ Irish_Albums : r1
Irish_Recordings ||--o{ Irish_Musicians : r2
Irish_Albums {
Url p0 "Apple Music"
MultiSelect p1 "Source"
Url p2 "The session link"
Title p3 "Name"
}
Irish_Albums ||--o{ Irish_Musicians : r0
Irish_Albums ||--o{ Irish_Recordings : r1
Irish_Recordings {
Url p0 "Apple Music"
Rollup p1 "RecordingsOnSameAlbum"
Number p2 "Number"
Title p3 "Name"
}
Irish_Recordings ||--o{ Irish_Tunes : r0
Irish_Recordings ||--o{ Irish_Albums : r1
Irish_Recordings ||--o{ Irish_Musicians : r2
Irish_Albums {
Url p0 "Apple Music"
MultiSelect p1 "Source"
Url p2 "The session link"
Title p3 "Name"
}
Irish_Albums ||--o{ Irish_Musicians : r0
Irish_Albums ||--o{ Irish_Recordings : r1