Skip to content

Commit 5537195

Browse files
committed
Merge pull request cms-sw#1657 from cmsdoxy/patch-3
Documentation fixes -- Fix hierarchy problem
2 parents 075f825 + 82bfa72 commit 5537195

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Documentation/ReferenceManualScripts/python/MainPageGenerator.py

+9-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class MainPageGenerator:
99
# @param cmsVer is version of CMSSW.
1010
def __init__(self, dataPath, path, cmsVer = ""):
1111
self.path = path
12-
self.dataPath = dataPath
12+
self.dataPath = dataPath
1313

1414
self.CMSVER = cmsVer
1515

@@ -198,22 +198,24 @@ def PrepareData(self):
198198
contents = soup.find("div", { "class" : "contents" })
199199
tr = contents.findAll("tr", {})
200200
self.classes= {}
201+
origin = 0
202+
if tr[0].text == 'src': origin = -1
201203
# depth of interface items can be only 3
202204
flag = False
203205
for i in tr:
204-
if self.__GetHTMLItemDepth(i) == 1:
206+
if self.__GetHTMLItemDepth(i) + origin == 1:
205207
self.classes[i.text] = {}
206208
level1 = i.text
207209
flag = False
208210

209-
if self.__GetHTMLItemDepth(i) == 2:
211+
if self.__GetHTMLItemDepth(i) + origin == 2:
210212
self.classes[level1][i.text] = {}
211213
level2 = i.text
212214
flag = False
213215

214-
if self.__GetHTMLItemDepth(i) == 3 and i.text == u'interface':
216+
if self.__GetHTMLItemDepth(i) + origin == 3 and i.text == u'interface':
215217
flag = True
216-
if self.__GetHTMLItemDepth(i) == 3 and i.text != u'interface':
218+
if self.__GetHTMLItemDepth(i) + origin == 3 and i.text != u'interface':
217219
flag = False
218220

219221
# print i.text, self.__GetHTMLItemDepth(i)
@@ -418,9 +420,9 @@ def HTMLTreeAddItem(self, title, links = None, endNode = False, folder = False):
418420
html = html + '\t<span class="file">%s</span>\n' % title
419421
return html + '\t</li>\n'
420422

421-
if len(sys.argv) == 5:
423+
if len(sys.argv) == 5:
422424
DATA_PATH = sys.argv[1]
423-
PATH = sys.argv[2]
425+
PATH = sys.argv[2]
424426
VER = sys.argv[3]
425427
OUTF = sys.argv[4]
426428

0 commit comments

Comments
 (0)