mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-09-19 12:42:42 +08:00
refactor(lib): rename main
to __main__
(#82)
* refactor(lib): rename `main` to `__main__` This allows to call the module using `python -m manim-slides`, useful for profiling, etc. * fix(setup): update name
This commit is contained in:
29
manim_slides/__main__.py
Normal file
29
manim_slides/__main__.py
Normal file
@ -0,0 +1,29 @@
|
||||
import click
|
||||
from click_default_group import DefaultGroup
|
||||
|
||||
from . import __version__
|
||||
from .convert import convert
|
||||
from .present import list_scenes, present
|
||||
from .wizard import init, wizard
|
||||
|
||||
|
||||
@click.group(cls=DefaultGroup, default="present", default_if_no_args=True)
|
||||
@click.version_option(__version__, "-v", "--version")
|
||||
@click.help_option("-h", "--help")
|
||||
def cli() -> None:
|
||||
"""
|
||||
Manim Slides command-line utilities.
|
||||
|
||||
If no command is specified, defaults to `present`.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
cli.add_command(convert)
|
||||
cli.add_command(init)
|
||||
cli.add_command(list_scenes)
|
||||
cli.add_command(present)
|
||||
cli.add_command(wizard)
|
||||
|
||||
if __name__ == "__main__":
|
||||
cli()
|
Reference in New Issue
Block a user