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 Options
generate_toc /home/user/notebook.ipynb [options]
generate_toc "C:\My Files\My Notebook.ipynb" [options]
generate_toc --help
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jupyter-toc-generator-0.2.0.tar.gz.
File metadata
- Download URL: jupyter-toc-generator-0.2.0.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
081e3012b9af7b5da2d6f6fa7ae20c5c52da59094f8c9b405da2efc741daa549
|
|
| MD5 |
11c4906877e0a844beed0255ed793005
|
|
| BLAKE2b-256 |
cffa72b69dc2207ef23691111a30e49de30979c37ff6b3c70f86e67e6ba0f674
|
File details
Details for the file jupyter_toc_generator-0.2.0-py3-none-any.whl.
File metadata
- Download URL: jupyter_toc_generator-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6d87eb60844c623d7a4d41931a2d527572f9c934e5a588db69df165c33650c4
|
|
| MD5 |
102e2a5339613d0571339192846c5d28
|
|
| BLAKE2b-256 |
1bf28695d1898e6f6d2c45f331d1d3a9b11e494897616c0ecaabc5edb5f21098
|