Generate a table of contents incl. links and anchor tags in a Jupyter Notebook.
Project description
jupyter-toc-generator
Generate a table of contents incl. links and anchor tags. Writes directly to the Jupyter Notebook. Alternatively, copy the generated table of contents to clipboard.
- No third party dependencies except Pyperclip if using --clipboard option.
- Requires Python 3.7 or higher. Therefore, compatible with AWS Sagemaker.
Usage
python generate_toc /home/user/notebook.ipynb [options]
python generate_toc "C:\My Files\My Notebook.ipynb" [options]
python generate_toc --help
Options
Parameter | Mandatory | Description | Example |
---|---|---|---|
x | Path to Jupyter notebook (relative or absolute) | /home/user/notebook.ipynp | |
--log_level (-l) | Set Log level (DEBUG, INFO, WARNING, ERROR, CRITICAL). Default: INFO. | -l DEBUG | |
--skip_anchor_tags (-sa) | Don't add anchor tags to header cells if missing. | -sa | |
--skip_write_toc (-sw) | Don't Update TOC directly in notebook or insert if missing. | -sw | |
--force_toc_in_first_cell (-f) | If inserting missing TOC, don't skip overall title cell but always insert into first cell. | -f | |
--clipboard (-c) | Copy generated TOC to clipboard. | -c |
Screenshots
Notebook before
Notebook after TOC generation
Generated Markdown Code for TOC and anchor tags added to headers
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for jupyter-toc-generator-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 515eeb304c0fc37ead466346c3a7ac3ac3acc2fea00d1e20703d06293b137027 |
|
MD5 | 83b581204a3fca3d3eb6be9a7bbcd5da |
|
BLAKE2b-256 | 1984967db1721ab253054dba1e6e6c16251ec5e9c4865c066c675eb392471e0d |
Close
Hashes for jupyter_toc_generator-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68d163df98563f80e9225e516b6cfe4932f7fd1d782160725086b61a873d6ea5 |
|
MD5 | bb9ab5c074717d11811bbaf4e7320d10 |
|
BLAKE2b-256 | 6b7c73884d9af7e1c7fbd093e0266d25b0596f95fbc17a6f696f7411e09d059a |