From 80a1f18e471183d789a6004c7a38205a700d15f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Eertmans?= Date: Thu, 2 Jan 2025 18:03:20 +0100 Subject: [PATCH] chore(docs): document config options --- docs/source/conf.py | 1 + docs/source/reference/cli.md | 31 +++++++++++++++++++++++++++++++ manim_slides/convert.py | 2 +- pyproject.toml | 1 + uv.lock | 15 +++++++++++++++ 5 files changed, 49 insertions(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 66d53f41..3e18b5d1 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -30,6 +30,7 @@ # Additional "nbsphinx", "myst_parser", + "sphinxcontrib.programoutput", "sphinxext.opengraph", "sphinx_click", "sphinx_copybutton", diff --git a/docs/source/reference/cli.md b/docs/source/reference/cli.md index d0830b6d..5308de18 100644 --- a/docs/source/reference/cli.md +++ b/docs/source/reference/cli.md @@ -8,3 +8,34 @@ This page contains an exhaustive list of all the commands available with `manim- :prog: manim-slides :nested: full ``` + +# Config Options + +Each converter has its own configuration options, which are listed below. + +::::{dropdown} HTML +:open: +```{program-output} manim-slides convert --to=html --show-config +``` +:::: + +::::{dropdown} Zip +:open: +:::{note} +The Zip converter inherits from the HTML converter. +::: +```{program-output} manim-slides convert --to=zip --show-config +``` +:::: + +::::{dropdown} PDF +:open: +```{program-output} manim-slides convert --to=pdf --show-config +``` +:::: + +::::{dropdown} HTML +:open: +```{program-output} manim-slides convert --to=pdf --show-config +``` +:::: \ No newline at end of file diff --git a/manim_slides/convert.py b/manim_slides/convert.py index 5f3e650d..fbd47b6a 100644 --- a/manim_slides/convert.py +++ b/manim_slides/convert.py @@ -884,7 +884,7 @@ def callback(ctx: Context, param: Parameter, value: bool) -> None: @click.command() @click.argument("scenes", nargs=-1) @folder_path_option -@click.argument("dest", type=click.Path(dir_okay=False, path_type=Path), is_eager=True) +@click.argument("dest", type=click.Path(dir_okay=False, path_type=Path)) @click.option( "--to", type=click.Choice(["auto", "html", "pdf", "pptx", "zip"], case_sensitive=False), diff --git a/pyproject.toml b/pyproject.toml index 66c1c1d2..a083c88b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,6 +50,7 @@ docs = [ "nbsphinx>=0.9.2", "pandoc>=2.3", "sphinx>=7.0.1", + "sphinxcontrib-programoutput>=0.18", "sphinx-click>=4.4.0", "sphinx-copybutton>=0.5.1", "sphinxext-opengraph>=0.7.5", diff --git a/uv.lock b/uv.lock index f2d22b2b..ddab9647 100644 --- a/uv.lock +++ b/uv.lock @@ -1517,6 +1517,7 @@ docs = [ { name = "sphinx", version = "8.1.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, { name = "sphinx-click" }, { name = "sphinx-copybutton" }, + { name = "sphinxcontrib-programoutput" }, { name = "sphinxext-opengraph" }, ] full = [ @@ -1641,6 +1642,7 @@ requires-dist = [ { name = "sphinx", marker = "extra == 'docs'", specifier = ">=7.0.1" }, { name = "sphinx-click", marker = "extra == 'docs'", specifier = ">=4.4.0" }, { name = "sphinx-copybutton", marker = "extra == 'docs'", specifier = ">=0.5.1" }, + { name = "sphinxcontrib-programoutput", marker = "extra == 'docs'", specifier = ">=0.18" }, { name = "sphinxext-opengraph", marker = "extra == 'docs'", specifier = ">=0.7.5" }, { name = "tqdm", specifier = ">=4.64.1" }, ] @@ -3897,6 +3899,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c2/42/4c8646762ee83602e3fb3fbe774c2fac12f317deb0b5dbeeedd2d3ba4b77/sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178", size = 5071 }, ] +[[package]] +name = "sphinxcontrib-programoutput" +version = "0.18" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "sphinx", version = "7.4.7", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, + { name = "sphinx", version = "8.1.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/3f/c0/834af2290f8477213ec0dd60e90104f5644aa0c37b1a0d6f0a2b5efe03c4/sphinxcontrib_programoutput-0.18.tar.gz", hash = "sha256:09e68b6411d937a80b6085f4fdeaa42e0dc5555480385938465f410589d2eed8", size = 26333 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/04/2c/7aec6e0580f666d4f61474a50c4995a98abfff27d827f0e7bc8c4fa528f5/sphinxcontrib_programoutput-0.18-py3-none-any.whl", hash = "sha256:8a651bc85de69a808a064ff0e48d06c12b9347da4fe5fdb1e94914b01e1b0c36", size = 20346 }, +] + [[package]] name = "sphinxcontrib-qthelp" version = "2.0.0"