diff options
Diffstat (limited to 'doc/tools/doc_status.py')
| -rw-r--r-- | doc/tools/doc_status.py | 47 |
1 files changed, 18 insertions, 29 deletions
diff --git a/doc/tools/doc_status.py b/doc/tools/doc_status.py index 6b936899d8..ab74c0b9d6 100644 --- a/doc/tools/doc_status.py +++ b/doc/tools/doc_status.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python import fnmatch import os @@ -245,20 +245,6 @@ class ClassStatus: status = ClassStatus() status.name = c.attrib['name'] - # setgets do not count - methods = [] - for tag in list(c): - if tag.tag in ['methods']: - for sub_tag in list(tag): - methods.append(sub_tag.find('name')) - if tag.tag in ['members']: - for sub_tag in list(tag): - try: - methods.remove(sub_tag.find('setter')) - methods.remove(sub_tag.find('getter')) - except: - pass - for tag in list(c): if tag.tag == 'brief_description': @@ -269,9 +255,8 @@ class ClassStatus: elif tag.tag in ['methods', 'signals']: for sub_tag in list(tag): - if sub_tag.find('name') in methods or tag.tag == 'signals': - descr = sub_tag.find('description') - status.progresses[tag.tag].increment(len(descr.text.strip()) > 0) + descr = sub_tag.find('description') + status.progresses[tag.tag].increment(len(descr.text.strip()) > 0) elif tag.tag in ['constants', 'members']: for sub_tag in list(tag): status.progresses[tag.tag].increment(len(sub_tag.text.strip()) > 0) @@ -297,17 +282,21 @@ input_class_list = [] merged_file = "" for arg in sys.argv[1:]: - if arg.startswith('--'): - flags[long_flags[arg[2:]]] = not flags[long_flags[arg[2:]]] - elif arg.startswith('-'): - for f in arg[1:]: - flags[f] = not flags[f] - elif os.path.isdir(arg): - for f in os.listdir(arg): - if f.endswith('.xml'): - input_file_list.append(os.path.join(arg, f)); - else: - input_class_list.append(arg) + try: + if arg.startswith('--'): + flags[long_flags[arg[2:]]] = not flags[long_flags[arg[2:]]] + elif arg.startswith('-'): + for f in arg[1:]: + flags[f] = not flags[f] + elif os.path.isdir(arg): + for f in os.listdir(arg): + if f.endswith('.xml'): + input_file_list.append(os.path.join(arg, f)); + else: + input_class_list.append(arg) + except KeyError: + print("Unknown command line flag: " + arg) + sys.exit(1) if flags['i']: for r in ['methods', 'constants', 'members', 'signals']: |