2021-10-20 06:31:36 +00:00
|
|
|
import click
|
2021-10-11 00:58:49 +00:00
|
|
|
import yaml
|
|
|
|
|
2021-10-20 06:31:36 +00:00
|
|
|
from kiwi_scp.commands.cli import KiwiCLI
|
|
|
|
from kiwi_scp.config import Config
|
|
|
|
|
|
|
|
|
|
|
|
@click.command(cls=KiwiCLI)
|
|
|
|
@click.pass_context
|
|
|
|
def main(ctx):
|
|
|
|
"""A complex command line interface."""
|
2021-10-11 00:58:49 +00:00
|
|
|
|
2021-10-20 06:31:36 +00:00
|
|
|
with open("./kiwi.yml") as kc:
|
2021-10-11 00:58:49 +00:00
|
|
|
yml = yaml.safe_load(kc)
|
2021-10-20 06:31:36 +00:00
|
|
|
ctx.ensure_object(dict)
|
|
|
|
ctx.obj["cfg"] = Config(**yml)
|
2021-10-11 00:58:49 +00:00
|
|
|
|
2021-10-20 06:31:36 +00:00
|
|
|
click.echo("Hello main")
|
2021-10-12 17:17:28 +00:00
|
|
|
|
2021-10-11 00:58:49 +00:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|