File: config.py

package info (click to toggle)
python-cloup 3.0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 936 kB
  • sloc: python: 5,371; makefile: 120
file content (34 lines) | stat: -rw-r--r-- 739 bytes parent folder | download | duplicates (2)
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