started a class for configuration of the CLI and CLI click-decorated functions
This commit is contained in:
28
main.py
Normal file
28
main.py
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
import click
|
||||||
|
from pathlib import Path, PurePath, PurePosixPath, PureWindowsPath, PosixPath, WindowsPath
|
||||||
|
from typing import TypeAlias as Neotype
|
||||||
|
from typing import Union
|
||||||
|
# import configparser as ini
|
||||||
|
# from cerberus import Validator as constrain_by
|
||||||
|
# import skansible_types as skato
|
||||||
|
|
||||||
|
ExecutedPath: Neotype = Union[PosixPath, WindowsPath]
|
||||||
|
IdlePath: Neotype = Union[PurePosixPath, PureWindowsPath]
|
||||||
|
|
||||||
|
# @NOTE https://docs.python.org/3/library/configparser.html#quick-start
|
||||||
|
class Config:
|
||||||
|
path: IdlePath = PurePath(str(Path(__file__).parent.resolve())) / "config.ini"
|
||||||
|
|
||||||
|
@click.group()
|
||||||
|
def skansible():
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
@click.command()
|
||||||
|
def init():
|
||||||
|
if Path(str(Config.path)).exists():
|
||||||
|
click.echo("")
|
||||||
|
else:
|
||||||
|
pass
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
skansible()
|
||||||
Reference in New Issue
Block a user