CLI and JSON workflow

Create a new lecture folder

jupyter-lecture-studio init "lecture-01" --course "Python Programming"

The folder contains lecture.json, a starter notebook and a short README. An existing destination is refused so the command does not overwrite your work.

Describe content in JSON

{
  "brand": {
    "course": "Python Programming",
    "series": "PYTHON SERIES",
    "lesson": "01",
    "language": "python"
  },
  "theme": {"preset": "gold", "direction": "ltr", "motion": true},
  "components": [
    {"type": "cover", "title": "Names and values", "description": "Understand rebinding."},
    {
      "type": "slide",
      "title": "A name refers to an object",
      "cards": [{"title": "Observe", "code": "x = 10\nx = 'ten'"}],
      "activity": {"question": "What is x now?", "answer": "The string 'ten'."}
    }
  ]
}

Supported component types: cover, slide, note, table. Theme and brand use the same fields as their Python models. Unknown fields and invalid values raise an error rather than being silently ignored.

Export

jupyter-lecture-studio export lecture-01/lecture.json lecture-01/lecture.html

Export replaces an existing HTML destination. It does not execute code snippets in the content.

Read offline documentation

jupyter-lecture-studio docs

The command prints the absolute path of the documentation index included in the installed package. Open that file in a browser. The site includes English and Arabic guides, API reference, local styles and a search index.

from jupyter_lecture_studio import documentation_path
print(documentation_path())

For a source checkout, run python tools/build_docs.py first. Published archives already include the built documentation.

Backward compatibility

The older lecture-studio command still works. python -m jupyter_lecture_studio runs the same command-line interface.