From 1b4bc490a027d3e618b2529d1f24357f3dc77f05 Mon Sep 17 00:00:00 2001 From: "Andreas M. Antonopoulos" Date: Wed, 4 Jul 2012 17:58:09 -0700 Subject: [PATCH] parameter metadata parser, display improvements --- Tools/autotest/param_metadata/param_parse.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Tools/autotest/param_metadata/param_parse.py b/Tools/autotest/param_metadata/param_parse.py index 49325d363a..af0d33b801 100644 --- a/Tools/autotest/param_metadata/param_parse.py +++ b/Tools/autotest/param_metadata/param_parse.py @@ -21,7 +21,7 @@ def camelcase_escape(word): def wiki_parameters(g, f): - t = "\n\n= %s Parameters =\n" % (camelcase_escape(g.name)) + t = "\n\n== %s Parameters ==\n" % (camelcase_escape(g.name)) for param in g.params: t += "\n\n=== %s (%s) ===" % (camelcase_escape(param.DisplayName),camelcase_escape(param.name)) @@ -128,17 +128,21 @@ for library in libraries: wiki_fname = 'Parameters.wiki' f = open(wiki_fname, mode='w') preamble = '''#summary Dynamically generated list of documented parameters += Table of Contents = - - += Vehicles = ''' f.write(preamble) for vehicle in vehicles: wiki_parameters(vehicle, f) + +t = "\n\n=Libraries=\n\n" +f.write(t) for library in libraries: - wiki_parameters(library, f) + if library.params: + wiki_parameters(library, f) f.close