[DEBUG] corect help
This commit is contained in:
parent
fd58b31c26
commit
8336411ec2
38
bin/lutin
38
bin/lutin
@ -17,6 +17,7 @@ import lutin.module as module
|
|||||||
import lutin.target as target
|
import lutin.target as target
|
||||||
import lutin.env as env
|
import lutin.env as env
|
||||||
import lutin.multiprocess as multiprocess
|
import lutin.multiprocess as multiprocess
|
||||||
|
import lutin.tools as tools
|
||||||
|
|
||||||
myArgs = arguments.LutinArg()
|
myArgs = arguments.LutinArg()
|
||||||
myArgs.add(arguments.ArgDefine("h", "help", desc="Display this help"))
|
myArgs.add(arguments.ArgDefine("h", "help", desc="Display this help"))
|
||||||
@ -66,7 +67,8 @@ def usage(full=False):
|
|||||||
for mod in listOfAllModule:
|
for mod in listOfAllModule:
|
||||||
data_print = " "
|
data_print = " "
|
||||||
if full == False:
|
if full == False:
|
||||||
if mod["type"][:6] == "BINARY":
|
if mod["type"] != None \
|
||||||
|
and mod["type"][:6] == "BINARY":
|
||||||
data_print += color['blue']
|
data_print += color['blue']
|
||||||
if mod["sub-type"] == "":
|
if mod["sub-type"] == "":
|
||||||
data_print += "* "
|
data_print += "* "
|
||||||
@ -78,9 +80,11 @@ def usage(full=False):
|
|||||||
data_print += "S "
|
data_print += "S "
|
||||||
else:
|
else:
|
||||||
data_print += " "
|
data_print += " "
|
||||||
elif mod["type"] == "PACKAGE":
|
elif mod["type"] != None \
|
||||||
|
and mod["type"] == "PACKAGE":
|
||||||
data_print += color['red'] + "# "
|
data_print += color['red'] + "# "
|
||||||
elif mod["type"][:7] == "LIBRARY":
|
elif mod["type"] != None \
|
||||||
|
and mod["type"][:7] == "LIBRARY":
|
||||||
data_print += color['yellow'] + " "
|
data_print += color['yellow'] + " "
|
||||||
else:
|
else:
|
||||||
data_print += color['default'] + " "
|
data_print += color['default'] + " "
|
||||||
@ -89,9 +93,11 @@ def usage(full=False):
|
|||||||
data_print += mod["name"] + color['default']
|
data_print += mod["name"] + color['default']
|
||||||
if full == False:
|
if full == False:
|
||||||
data_print += "\r\t\t\t\t\t\t\t"
|
data_print += "\r\t\t\t\t\t\t\t"
|
||||||
if mod["license"] != "":
|
if mod["license"] != None \
|
||||||
|
and mod["license"] != "":
|
||||||
data_print += color['yellow'] + " [" + mod["license"] + "]" + color['default']
|
data_print += color['yellow'] + " [" + mod["license"] + "]" + color['default']
|
||||||
if mod["version"] != []:
|
if mod["version"] != None \
|
||||||
|
and mod["version"] != []:
|
||||||
version_ID = tools.version_to_string(mod["version"])
|
version_ID = tools.version_to_string(mod["version"])
|
||||||
data_print += color['blue'] + " (" + version_ID + ")" + color['default']
|
data_print += color['blue'] + " (" + version_ID + ")" + color['default']
|
||||||
"""
|
"""
|
||||||
@ -106,11 +112,14 @@ def usage(full=False):
|
|||||||
if mod["description"] != "":
|
if mod["description"] != "":
|
||||||
print(" " + mod["description"])
|
print(" " + mod["description"])
|
||||||
if full == True:
|
if full == True:
|
||||||
if mod["type"] != "":
|
if mod["type"] != None \
|
||||||
|
and mod["type"] != "":
|
||||||
print(" Type: " + mod["type"])
|
print(" Type: " + mod["type"])
|
||||||
if mod["sub-type"] != "":
|
if mod["sub-type"] != None \
|
||||||
|
and mod["sub-type"] != "":
|
||||||
print(" Sub-Type: " + mod["sub-type"])
|
print(" Sub-Type: " + mod["sub-type"])
|
||||||
if mod["version"] != []:
|
if mod["version"] != None \
|
||||||
|
and mod["version"] != []:
|
||||||
version_ID = ""
|
version_ID = ""
|
||||||
for id in mod["version"]:
|
for id in mod["version"]:
|
||||||
if len(version_ID) != 0:
|
if len(version_ID) != 0:
|
||||||
@ -120,14 +129,19 @@ def usage(full=False):
|
|||||||
version_ID+="."
|
version_ID+="."
|
||||||
version_ID += str(id)
|
version_ID += str(id)
|
||||||
print(" version: " + color['blue'] + version_ID + color['default'])
|
print(" version: " + color['blue'] + version_ID + color['default'])
|
||||||
if mod["compagny-type"] != "" \
|
if mod["compagny-type"] != None \
|
||||||
|
and mod["compagny-name"] != None \
|
||||||
|
and mod["compagny-type"] != "" \
|
||||||
and mod["compagny-name"] != "":
|
and mod["compagny-name"] != "":
|
||||||
print(" compagny: " + color['purple'] + mod["compagny-type"] + "/" + mod["compagny-name"] + color['default'])
|
print(" compagny: " + color['purple'] + mod["compagny-type"] + "/" + mod["compagny-name"] + color['default'])
|
||||||
elif mod["compagny-name"] != "":
|
elif mod["compagny-name"] != None \
|
||||||
|
and mod["compagny-name"] != "":
|
||||||
print(" compagny: " + color['purple'] + mod["compagny-name"] + color['default'])
|
print(" compagny: " + color['purple'] + mod["compagny-name"] + color['default'])
|
||||||
if mod["license"] != "":
|
if mod["license"] != None \
|
||||||
|
and mod["license"] != "":
|
||||||
print(" license: " + color['yellow'] + mod["license"] + color['default'])
|
print(" license: " + color['yellow'] + mod["license"] + color['default'])
|
||||||
if mod["maintainer"] != []:
|
if mod["maintainer"] != None \
|
||||||
|
and mod["maintainer"] != []:
|
||||||
print(" maintainers:")
|
print(" maintainers:")
|
||||||
for elem in mod["maintainer"]:
|
for elem in mod["maintainer"]:
|
||||||
print(" " + str(elem))
|
print(" " + str(elem))
|
||||||
|
Loading…
Reference in New Issue
Block a user