Multi-database support
Nprompter supports fetching and aggregating content from multiple Notion databases in a single build.
When configured with multiple databases, Nprompter creates individual subdirectories for each database as well as a consolidated global index page linking to all available scripts.
Configuration
Configure multiple databases under [build.databases] in your nprompter.toml:
[build]
output = "prompter"
filter.property = "Status"
filter.value = "Ready"
sort.property = "Name"
# Database 1: Uses global defaults
[[build.databases]]
database_id = "c68ccc052d1b4eaaa3091e637f7011c5"
# Database 2: Overrides filter and sort properties
[[build.databases]]
database_id = "133439be4d2680aa840adbde85d8a923"
filter.property = "Category"
filter.value = "Recorded"
sort.property = "Episode"
How It Works
- Global options: Global settings specified in
[build],[font],[screen], and[processor]apply across all databases. - Database-specific overrides: You can provide distinct
filter.property,filter.value, andsort.propertyfields inside any[[build.databases]]entry. - Index Generation:
- Global root index:
prompter/index.htmllists all databases and their scripts. - Database sub-index:
prompter/<DATABASE_ID>/index.htmlcontains the scripts for that specific database. - Individual script:
prompter/<DATABASE_ID>/<SLUG>/index.html.
Building
Once configured in nprompter.toml, simply run:
nprompter build