From: Vladimír Vondruš Date: Thu, 18 Jan 2018 20:20:23 +0000 (+0100) Subject: doxygen: properly ignore empty/private documentation pages. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=0913e2b596fb163527aafc70e29c7ad755136006;p=blog.git doxygen: properly ignore empty/private documentation pages. --- diff --git a/doxygen/dox2html5.py b/doxygen/dox2html5.py index 5dbf709a..f3d50d4d 100755 --- a/doxygen/dox2html5.py +++ b/doxygen/dox2html5.py @@ -1273,13 +1273,15 @@ def parse_xml(state: State, xml: str): assert compounddef.tag == 'compounddef' assert len([i for i in root]) == 1 - # Ignoring private structs/classes, unnamed namespaces, files and - # directories that have absolute location (i.e., outside of the - # main source tree) + # Ignoring private structs/classes and unnamed namespaces if ((compounddef.attrib['kind'] in ['struct', 'class', 'union'] and compounddef.attrib['prot'] == 'private') or - (compounddef.attrib['kind'] == 'namespace' and '@' in compounddef.find('compoundname').text) or - (compounddef.attrib['kind'] in ['dir', 'file'] and os.path.isabs(compounddef.find('location').attrib['file']))): - logging.debug("only private things in {}, skipping".format(os.path.basename(xml))) + (compounddef.attrib['kind'] == 'namespace' and '@' in compounddef.find('compoundname').text)): + logging.debug("{}: only private things, skipping".format(state.current)) + return None + + # Ignoring dirs/files w/o any description + if compounddef.attrib['kind'] in ['dir', 'file'] and not compounddef.find('briefdescription') and not compounddef.find('detaileddescription'): + logging.debug("{}: file/dir documentation empty, skipping".format(state.current)) return None compound = Empty()