Using nprompter
Installation
Nprompter is available from PyPI, install it with your favourite package manager:
pip install nprompter
build
This command is used to generate your teleprompter pages from a Notion database.
After you have created an integration, the next step is as easy as running the command build:
nprompter build [DATABASE ID] [NOTION_API_KEY]
This command will generate a bunch of HTML files in a folder named prompter, just open the index.html file inside a browser to start using your teleprompter (or serve them via nprompter serve).
Tip: You can specify
NOTION_API_KEYvia an environment variableNOTION_API_KEYor configure the database innprompter.toml, making both arguments optional when runningnprompter build.
Options
The build command takes several optional parameters that allow for customization:
-o [PATH]/--output [PATH]: Where the output should be written. Defaults to"prompter".-f [STRING]/--filter [STRING]: Notion database property name to filter pages by. Defaults to"Status".--value [STRING]: The property value to filter by. Defaults to"Ready".-s [STRING]/--sort [STRING]: Notion database property name to sort documents by. Defaults to"Name".-c [PATH]/--config [PATH]: Path to an appearance configuration file. Defaults tonprompter.tomlif present in current directory. See Configuration file for details.--extra-css [PATH]: Path to an additional CSS file to further customize the teleprompter's appearance. Defaults toNone.--download/--no-download: Whether to download information from Notion or simply regenerate the static styles and assets. Defaults to--download.-q/--quiet: Suppress all output except errors.-v/--verbose: Increase verbosity (can be passed multiple times:-v,-vv,-vvv).
Verbosity levels
You can control the amount of feedback printed to the console using -q or -v:
- Default (normal): Shows standard operational messages and errors.
- Quiet (
-q/--quiet): Suppresses all output except errors. - Verbose (
-v): Shows detailed step-by-step progress and configuration values used. - Very Verbose (
-vv/-vvv): Enables debugging information including full stack traces and HTTP logs.
serve
This command runs a basic web server used to serve the pages generated by the build command.
nprompter serve [OPTIONS] [PORT] [CONTENT_DIRECTORY]
You can simply run nprompter serve without any arguments to use the defaults: 8889 for PORT and "prompter" for CONTENT_DIRECTORY.
Options
--browser/--no-browser: Whether the command will attempt to open the computer's default browser pointing to the teleprompter's page. The default is--browser.-q/--quiet: Suppress all output except errors.-v/--verbose: Increase verbosity (can be used multiple times:-v,-vv,-vvv).
create-config
This command generates a starter nprompter.toml configuration file with the default settings in your current working directory.
nprompter create-config [OPTIONS]
Options
--override/--no-override: Whether to overwrite an existingnprompter.tomlfile. Defaults to--no-override.-q/--quiet: Suppress all output except errors.-v/--verbose: Increase verbosity (can be used multiple times:-v,-vv,-vvv).