Skip to content

Commit ee92e0a

Browse files
authored
chore(docs): improve CLI docs (#27)
* chore(docs): cleanup code & docs * chore(docs): better document present command * chore(docs): improve gh page
1 parent cbee632 commit ee92e0a

File tree

6 files changed

+25
-7
lines changed

6 files changed

+25
-7
lines changed

docs/source/_static/logo.png

110 KB
Loading

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# -- Project information -----------------------------------------------------
77
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
88

9-
project = 'manim-slides'
9+
project = 'Manim Slides'
1010
copyright = '2022, Jérome Eertmans'
1111
author = 'Jérome Eertmans'
1212

docs/source/index.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,17 @@
33
You can adapt this file completely to your liking, but it should at least
44
contain the root `toctree` directive.
55
6-
Welcome to manim-slides's documentation!
7-
========================================
6+
.. image:: _static/logo.png
7+
:width: 600
8+
:align: center
9+
:alt: Manim Slide logo
10+
11+
Welcome to Manim Slide's CLI documentation!
12+
===========================================
13+
14+
This page contains an exhaustive list of all the commands available with `manim-slides`.
15+
16+
If you need help installing or using Manim Slide, please refer to the `GitHub README <https://github.com/jeertmans/manim-slides>`_.
817

918
.. click:: manim_slides.main:cli
1019
:prog: manim-slides

manim_slides/commons.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ def config_path_option(function) -> Callable:
1010
return click.option(
1111
"-c",
1212
"--config",
13-
"config_path",
1413
default=CONFIG_PATH,
1514
type=click.Path(dir_okay=False),
1615
help="Set path to configuration file.",

manim_slides/present.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ def _list_scenes(folder) -> List[str]:
501501
filepath = os.path.join(folder, file)
502502
_ = PresentationConfig.parse_file(filepath)
503503
scenes.append(os.path.basename(file)[:-5])
504-
except Exception as e: # Could not parse this file as a proper presentation config
504+
except Exception: # Could not parse this file as a proper presentation config
505505
pass
506506

507507
return scenes
@@ -529,7 +529,7 @@ def _list_scenes(folder) -> List[str]:
529529
"--resolution",
530530
type=(int, int),
531531
default=(1920, 1080),
532-
help="Window resolution used if fullscreen is not set. You may manually resize the window afterward.",
532+
help="Window resolution WIDTH HEIGHT used if fullscreen is not set. You may manually resize the window afterward.",
533533
show_default=True,
534534
)
535535
@click.option(
@@ -558,7 +558,15 @@ def present(
558558
interpolation_flag,
559559
record_to,
560560
):
561-
"""Present the different scenes."""
561+
"""
562+
Present SCENE(s), one at a time, in order.
563+
564+
Each SCENE parameter must be the name of a Manim scene, with existing SCENE.json config file.
565+
566+
You can present the same SCENE multiple times by repeating the parameter.
567+
568+
Use `manim-slide list-scenes` to list all available scenes in a given folder.
569+
"""
562570

563571
if len(scenes) == 0:
564572
scene_choices = _list_scenes(folder)

manim_slides/wizard.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,15 @@ def prompt(question: str) -> int:
3838

3939
@click.command()
4040
@config_options
41+
@click.help_option("-h", "--help")
4142
def wizard(config_path, force, merge):
4243
"""Launch configuration wizard."""
4344
return _init(config_path, force, merge, skip_interactive=False)
4445

4546

4647
@click.command()
4748
@config_options
49+
@click.help_option("-h", "--help")
4850
def init(config_path, force, merge, skip_interactive=False):
4951
"""Initialize a new default configuration file."""
5052
return _init(config_path, force, merge, skip_interactive=True)

0 commit comments

Comments
 (0)