Skip to content

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, and 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 that browser to start using your teleprompter.

Note that you can specify the NOTION_API_KEY parameter via an environment variable too, and it is arguably a better alternative.

Options

The build command takes several optional parameters that allow for great customisation:

  • -o [PATH] / --output [PATH]: to specify where the output should be written to. Defaults to "./prompter".
  • -f [STRING] / --filter [STRING]: Nprompter fetches data from a Notion database filtering by properties and specific values, use this to specify which property to filter by. Defaults to "Status".
  • -v [STRING] / --value [STRING]: Nprompter fetches data from a Notion database filtering by properties and specific values, use this to specify which value to search for. Defaults to "Ready".
  • -c [PATH] / --config [PATH]: Specifies the location of a configuration file. Defaults to None. See the syntax of the configuration file for more information.
  • -s [PATH] / --extra-css [PATH]: Specifies the location of an additional CSS file to further customize the teleprompter's appereance. Defaults to None.
  • --download/--no-download: A flag that specifies whether to download information from Notion or simply regenerate the styles that accompany the teleprompter. Defaults to --download.

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.

create-config

This command helps the user create a configuration file used to customise the behaviour and appearance of the teleprompter.

Options

  • --override/--no-override: This flag allows the user to specify whether to override or not any existing config.toml. The default is set to --no-override.