diff options
author | Sebastian Koslowski <koslowski@kit.edu> | 2016-08-09 21:15:56 +0200 |
---|---|---|
committer | Sebastian Koslowski <koslowski@kit.edu> | 2016-08-09 21:18:29 +0200 |
commit | 8e2886dc6b45b4e3f68d84887f728483fd2d1538 (patch) | |
tree | e682bbea9e329c80ebc66233d58a01a1306bddbd /gr-utils/python/modtool/modtool_makexml.py | |
parent | cbe1e43b0f0d1ee0d356b7110700400578855ac6 (diff) | |
parent | fc1a6a88483120921936e415aba4d5d1a9b42d96 (diff) |
Merge remote-tracking branch 'upstream/next' into gtk3
Diffstat (limited to 'gr-utils/python/modtool/modtool_makexml.py')
-rw-r--r-- | gr-utils/python/modtool/modtool_makexml.py | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/gr-utils/python/modtool/modtool_makexml.py b/gr-utils/python/modtool/modtool_makexml.py index 575d7eb873..5f53749163 100644 --- a/gr-utils/python/modtool/modtool_makexml.py +++ b/gr-utils/python/modtool/modtool_makexml.py @@ -34,35 +34,34 @@ from util_functions import ask_yes_no class ModToolMakeXML(ModTool): """ Make XML file for GRC block bindings """ name = 'makexml' - aliases = ('mx',) + description = 'Generate XML files for GRC block bindings.' def __init__(self): ModTool.__init__(self) - def setup_parser(self): + @staticmethod + def setup_parser(parser): """ Initialise the option parser for 'gr_modtool makexml' """ - parser = ModTool.setup_parser(self) - parser.usage = """%prog info [options]. \n Call %prog without any options to run it interactively. + parser.usage = """%s Note: This does not work on Python blocks! - """ - return parser + """ % parser.usage + ModTool.setup_parser_block(parser) - def setup(self, options, args): - ModTool.setup(self, options, args) + def setup(self, options): + ModTool.setup(self, options) - if options.block_name is not None: - self._info['pattern'] = options.block_name - elif len(args) >= 2: - self._info['pattern'] = args[1] + if options.blockname is not None: + self._info['pattern'] = options.blockname else: self._info['pattern'] = raw_input('Which blocks do you want to parse? (Regex): ') if len(self._info['pattern']) == 0: self._info['pattern'] = '.' - def run(self): + def run(self, options): """ Go, go, go! """ print "Warning: This is an experimental feature. Don't expect any magic." + self.setup(options) # 1) Go through lib/ if not self._skip_subdirs['lib']: if self._info['version'] == '37': |