Command Line Interface
This guide provides a user-oriented walkthrough of the CLI module of ipynb2web. For detailed API documentation, please refer to the official documentation
Installation
To install ipynb2web, run the following command:
npm install ipynb2web
Usage Overview
The ipynb2web CLI provides three main commands to convert Jupyter notebooks (ipynb files) to various formats and create related assets. Execute it in the terminal as follows:
ipynb2web <COMMAND> <SAVETO> <FROM/or/SitemapName>
Commands
- 
Convert Notebooks to JSON Documents: This command processes directories containing
.ipynbfiles, converting them to JSON documents and creating navigation JSON for each directory.ipynb2web DirectoryName "custom/SAVETO/path/" "custom/FROM/path/" - 
Generate Sitemap: The sitemap command creates a
Sitemap.txtfile from multiple section navigations. It is useful for SEO and website navigation purposes. Optionally supports a path prefix for deployment in subdirectories.ipynb2web sitemap "custom/sitemap/path.txt"With optional path prefix:
ipynb2web sitemap ./ ./sitemap.txt /docs - 
Create Audio Assets: This command generates audio versions of documents, provided that the
.ipynbfiles include the necessary frontmatter. It requires theOPENAI_API_KEYto be stored in your.envfile.ipynb2web audio "custom/SAVETO/path/" "custom/FROM/path/" 
Notes
- Ensure that the paths provided in the commands are accurate and accessible.
 - The 
OPENAI_API_KEYis essential for theaudiocommand to function correctly.