1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
import os
import cloup
@cloup.group(
'config', aliases=['conf', 'cfg'],
invoke_without_command=True,
no_args_is_help=True,
)
def config():
"""Manage Manim configuration files."""
@config.command(no_args_is_help=True)
@cloup.option(
"-l", "--level",
type=cloup.Choice(["user", "cwd"], case_sensitive=False), default="cwd",
help="Specify if this config is for user or the working directory.",
)
@cloup.option("-o", "--open", "openfile", is_flag=True)
def write(level: str, openfile: bool) -> None:
"""Write configurations."""
@config.command()
def show():
"""Show current configuration."""
@config.command()
@cloup.option("-d", "--directory", default=os.getcwd())
def export(directory):
pass
|