packager: redesign as cmd-line application
Abstract
The packager is used to build a station specific subset of python modules to be installed on a TXT controller via it's ftc web interface. To use it in CI/CG automation the dialog oriented app should be re-designed as cmd-line application with parameters.
This feature request is related to feature #81 and comprises following tasks:
-
add command line parser (argparse) to util.txt_packager.py
-
replace user dialogs on exceptions by exception handling.
Specification
The txt_packager should implment the following arguments (specified in argparse
notation):
p=Argumentparser(description='Packager for station specific modules run on TXT controller.')
p.add_argument('-d', '--dest', help='Destination path to store package during packaging.')
p.add_argument('-i', '--source', help='Path of local flecsimo source tree. The path should end with ...src/.')
p.add_argument('-t', '--template', help='Name of the station directory in source tree.')
p.add_argument('-n', '--name', help='Short name of the station directory at TXT, e.g. REAMR1')
p.add_argument('--license',
action='store_true',
help='Show license and warranty disclaimer.')
Due to issue #83 (closed) thhe following additional requirements are posted:
- either that packed
py
and other text files are transformed to unix file format with x:0D end of line instead of x:OD OA before packaging. - or that at least the shebang of
startup.py
is followed by a unix new line. The rest seems to be no problem.
Edited by Bernhard Lehner