From: duplo Date: Thu, 19 Feb 2009 14:06:28 +0000 (+0000) Subject: Add the brief founded with the autobrief doxygen syntax X-Git-Tag: 2.1.0~323 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=54a6a413dbfba6ddcf43d20329f77605b5544f64;p=bertos.git Add the brief founded with the autobrief doxygen syntax git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2359 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index b27c754e..82b4ab7d 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -236,19 +236,27 @@ def getDescriptionInformations(comment): Take the doxygen comment and strip the wizard informations, returning the tuple (comment, wizard_information) """ + brief = "" description = "" information = {} for num, line in enumerate(comment): index = line.find("$WIZ$") if index != -1: - description += " " + line[:index] + if len(brief) == 0: + brief += line[:index].strip() + else: + description += " " + line[:index] try: exec line[index + len("$WIZ$ "):] in {}, information except: raise ParseError(num, line[index:]) else: - description += " " + line - return description.strip(), information + if len(brief) == 0: + brief += line.strip() + else: + description += " " + line + description = description.strip() + return brief.strip(), description.strip(), information def getDefinitionBlocks(text): """ @@ -332,7 +340,7 @@ def loadConfigurationInfos(path): configurationInfos = {} for comment, define in getDefinitionBlocks(open(path, "r").read()): name, value = formatParamNameValue(define) - description, informations = getDescriptionInformations(comment) + brief, description, informations = getDescriptionInformations(comment) configurationInfos[name] = {} configurationInfos[name]["value"] = value configurationInfos[name]["informations"] = informations @@ -347,6 +355,7 @@ def loadConfigurationInfos(path): configurationInfos[name]["informations"]["unsigned"] = True configurationInfos[name]["value"] = configurationInfos[name]["value"].replace("U", "") configurationInfos[name]["description"] = description + configurationInfos[name]["brief"] = brief return configurationInfos except ParseError, err: print "error in file %s. line: %d - statement %s" % (path, err.line_number, err.line)