added cli command extractenvironments to extract environments

This commit is contained in:
iLLiCiTiT 2021-02-19 12:31:56 +01:00
parent 78ba4bb296
commit 643c8d9a19

View file

@ -108,6 +108,27 @@ def eventserver(debug,
)
@main.command()
@click.argument("output_json_path")
@click.option("--project", help="Project name", default=None)
@click.option("--asset", help="Asset name", default=None)
@click.option("--task", help="Task name", default=None)
@click.option("--app", help="Application name", default=None)
def extractenvironments(output_json_path, project, asset, task, app):
"""Extract environment variables for entered context to a json file.
Entered output filepath will be created if does not exists.
All context options must be passed otherwise only pype's global
environments will be extracted.
Context options are "project", "asset", "task", "app"
"""
PypeCommands().extractenvironments(
output_json_path, project, asset, task, app
)
@main.command()
@click.argument("paths", nargs=-1)
@click.option("-g", "--gui", is_flag=True, help="Run pyblish GUI")