defs.mk, doxygen.mk, projects.py: Add support for PROJECT_SUMMARY

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2016-02-11 15:43:19 +00:00
commit 88be4181c7
3 changed files with 25 additions and 9 deletions

View file

@ -58,7 +58,7 @@ def read_value(path, section, key):
file = open(path)
except:
return None
r = ()
r = []
if not len(section):
for line in file:
r = re.findall('^ *' + key + ' *= *(.*)', line)
@ -74,9 +74,12 @@ def read_value(path, section, key):
if in_section:
if len(line) and line[0] == '[':
break
r = re.findall('^ *' + key + ' *= *(.*)', line)
if (len(r) > 0):
break
if key is None:
r.append(line)
else:
r = re.findall('^ *' + key + ' *= *(.*)', line)
if (len(r) > 0):
break
file.close()
if len(r):
@ -285,6 +288,17 @@ def cmd_htdocs_dir(args_):
r.append(htdocs_dir(m))
print(' '.join(r))
def cmd_summary(args_):
parser = argparse.ArgumentParser(description='summary')
parser.add_argument('module', nargs='*', help='Modules')
args=parser.parse_args(args_)
r = []
for m in args.module:
summary = get_value(m, "summary", None)
if summary is not None:
r.append(summary)
print(' '.join(r))
# -------------------------------------------------------------------- here we go
global_args = []