Commit a7af2127 authored by Sylvaine Ferrachat's avatar Sylvaine Ferrachat
Browse files

Improved helper message for --lang option

The list of available (aka 'supported') languages is now printed in the
helper
parent 8b1b61de
......@@ -36,6 +36,13 @@ tmpl_ext = '.tmpl'
config_header = '# Configure file for {}\n'.format(os.path.basename(sys.argv[0]))
config_file = os.path.join(os.path.expanduser('~'),'.mk_script.cfg')
# Supported languages helper
for rootdir, dirs, files in os.walk(tmpl_dir):
supported_lang = ['.'.join(file.split('.')[:-1]) for file in files]
supp_lang_str = '(avail: '
supp_lang_str += ', '.join(supported_lang)
supp_lang_str += ')'
#------------------------------------------
#-- Classes
class Script:
......@@ -97,7 +104,7 @@ class Script:
def run(
filename : 'file name of the script to create',
author : 'author' = None,
lang : 'Script language to apply' = DEFT_lang,
lang : 'Script language to apply '+supp_lang_str = DEFT_lang,
python_version : 'Python version (will be discarded in no-python context)' = DEFT_python_version,
with_begin : 'include python "begins" lib (will be discarded in no-python context)' = DEFT_with_begin,
with_license : 'Include license identifyer' = DEFT_with_license,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment