diff --git a/docs/source/_static/logo.png b/docs/source/_static/logo.png new file mode 100644 index 0000000..0b71c00 Binary files /dev/null and b/docs/source/_static/logo.png differ diff --git a/docs/source/conf.py b/docs/source/conf.py index 7ef10ee..0320e42 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -6,7 +6,7 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information -project = 'manim-slides' +project = 'Manim Slides' copyright = '2022, Jérome Eertmans' author = 'Jérome Eertmans' diff --git a/docs/source/index.rst b/docs/source/index.rst index 36d0ad5..7827936 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -3,8 +3,17 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to manim-slides's documentation! -======================================== +.. image:: _static/logo.png + :width: 600 + :align: center + :alt: Manim Slide logo + +Welcome to Manim Slide's CLI documentation! +=========================================== + +This page contains an exhaustive list of all the commands available with `manim-slides`. + +If you need help installing or using Manim Slide, please refer to the `GitHub README `_. .. click:: manim_slides.main:cli :prog: manim-slides diff --git a/manim_slides/commons.py b/manim_slides/commons.py index 2566297..8c04657 100644 --- a/manim_slides/commons.py +++ b/manim_slides/commons.py @@ -10,7 +10,6 @@ def config_path_option(function) -> Callable: return click.option( "-c", "--config", - "config_path", default=CONFIG_PATH, type=click.Path(dir_okay=False), help="Set path to configuration file.", diff --git a/manim_slides/present.py b/manim_slides/present.py index 7e7dad7..d66d8af 100644 --- a/manim_slides/present.py +++ b/manim_slides/present.py @@ -501,7 +501,7 @@ def _list_scenes(folder) -> List[str]: filepath = os.path.join(folder, file) _ = PresentationConfig.parse_file(filepath) scenes.append(os.path.basename(file)[:-5]) - except Exception as e: # Could not parse this file as a proper presentation config + except Exception: # Could not parse this file as a proper presentation config pass return scenes @@ -529,7 +529,7 @@ def _list_scenes(folder) -> List[str]: "--resolution", type=(int, int), default=(1920, 1080), - help="Window resolution used if fullscreen is not set. You may manually resize the window afterward.", + help="Window resolution WIDTH HEIGHT used if fullscreen is not set. You may manually resize the window afterward.", show_default=True, ) @click.option( @@ -558,7 +558,15 @@ def present( interpolation_flag, record_to, ): - """Present the different scenes.""" + """ + Present SCENE(s), one at a time, in order. + + Each SCENE parameter must be the name of a Manim scene, with existing SCENE.json config file. + + You can present the same SCENE multiple times by repeating the parameter. + + Use `manim-slide list-scenes` to list all available scenes in a given folder. + """ if len(scenes) == 0: scene_choices = _list_scenes(folder) diff --git a/manim_slides/wizard.py b/manim_slides/wizard.py index 68e31b2..b887429 100644 --- a/manim_slides/wizard.py +++ b/manim_slides/wizard.py @@ -38,6 +38,7 @@ def prompt(question: str) -> int: @click.command() @config_options +@click.help_option("-h", "--help") def wizard(config_path, force, merge): """Launch configuration wizard.""" return _init(config_path, force, merge, skip_interactive=False) @@ -45,6 +46,7 @@ def wizard(config_path, force, merge): @click.command() @config_options +@click.help_option("-h", "--help") def init(config_path, force, merge, skip_interactive=False): """Initialize a new default configuration file.""" return _init(config_path, force, merge, skip_interactive=True)