Skip to main content

JupyterLite for Jupyter Book processing

Reason this release was yanked:

README edits

Project description

JupyterLite / JupyterBook notebook processing

These are utilities to take text-format notebooks in a Jupyter Book directory, and write out a JupyterLite installation, containing .ipynb (JSON) notebooks with suitable processing.

The module provides the executable jljb-write-dir. See the help for that command for more details.

That command will:

  • Look for suitable _config.yml configuration in your specified configuration directory (defaulting to current directory).

  • It then looks in the configuration for a jupyterlite section, and within that section looks for these values (default if not specified):

    Name Default
    in_nb_ext .md
    out_nb_ext .ipynb
    in_nb_fmt myst
    remove_remove True
    proc_admonitions True
  • With that information, the script finds text format notebooks with the in_nb_ext extension, and applies the following processing to write into an output folder:

    • Replaces local kernel with Pyodide kernel in metadata.
    • Filters:
      • Note and admonition markers (if proc_admonitions is True)
      • Exercise markers (see sphinx_exercise.
      • Solution blocks for exercises.
      • Cells marked with remove-cell tag.
    • Writes notebooks to output directory.
    • Writes JSON jupyterlite file.

The typical way to use this module / command is to write your settings into the _config.yml file as above, and have a Makefile target of form:

jl:
	# Jupyter-lite files for book build.
    # Install specified requirements for built JupyterLite site.
	$(PIP_INSTALL_CMD) -r jl-build-requirements.txt
	jljb-write-dir $(BUILD_DIR)/interact data images --jl-tmp $(JL_DIR)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jljb-0.1a1.tar.gz (7.2 kB view details)

Uploaded Source

File details

Details for the file jljb-0.1a1.tar.gz.

File metadata

  • Download URL: jljb-0.1a1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for jljb-0.1a1.tar.gz
Algorithm Hash digest
SHA256 0871c493789810f3624fa7e321202c90488c7cdd772f18e6222b435b16b7212e
MD5 d668d974381edc54dfd44ce47c0bbfac
BLAKE2b-256 a9235746d5feda58a91bb4f2133ef9af7b795f3b81240efab4f22f4960344c0d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page