35 lines
841 B
Python
35 lines
841 B
Python
|
import sys
|
||
|
|
||
|
from core.project import project_new
|
||
|
|
||
|
__VXSDK_MODULE_META__ = (
|
||
|
['p', 'project'],
|
||
|
"project abstraction",
|
||
|
r"""vxsdk project
|
||
|
Abstract project manipulation
|
||
|
|
||
|
USAGE:
|
||
|
vxsdk project <COMMAND> [OPTIONS]
|
||
|
|
||
|
OPTIONS:
|
||
|
--list List installed command
|
||
|
-h, --help Print helps information
|
||
|
|
||
|
Common used commands:
|
||
|
n, new Create a new project
|
||
|
|
||
|
See `vxsdk project help <action>` for more information on a specific command
|
||
|
"""
|
||
|
)
|
||
|
|
||
|
def cli_parse(_, argv):
|
||
|
if argv:
|
||
|
if argv[0] == 'n' or argv[0] == 'new':
|
||
|
for path in argv[1:]:
|
||
|
project_new(path)
|
||
|
sys.exit(0)
|
||
|
if '-h' in argv or '--help' in argv:
|
||
|
logger(LOG_USER, __VXSDK_MODULE_META__[2])
|
||
|
sys.exit(0)
|
||
|
logger(LOG_EMERG, __VXSDK_MODULE_META__[2])
|