X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=build.py;h=376204959f810b72d7c5bfe126233c36b2346e01;hb=bdabd959ccc29a7eddeccfd7922425101b3f9ef7;hp=50ff861f471e7ed9912e677d590c36540fd54283;hpb=081e7af0b6f6dec0ca685d3a538eacf20394c2cc;p=ardour-manual diff --git a/build.py b/build.py index 50ff861..3762049 100755 --- a/build.py +++ b/build.py @@ -260,6 +260,21 @@ def FindInternalLinks(fs): linkDict['"@@' + hdr['link'] + '"'] = '"/' + hdr['filename'] + '/"' linkDict['"@@' + hdr['link'] + '#'] = '"/' + hdr['filename'] + '/index.html#' + + return linkDict + +# +# Same as above, but create anchors (for the one-page version) +# +def FindInternalAnchors(fs): + linkDict = {} + + for hdr in fs: + if 'link' in hdr: + linkDict['"@@' + hdr['link'] + '"'] = '"#' + hdr['link'] + '"' + linkDict['"@@' + hdr['link'] + '#'] = '"#' + hdr['link'] + '"' + + return linkDict @@ -297,15 +312,15 @@ def FixInternalLinks(links, content, title): # looking at currently # def BuildList(lst, fs, pagePos, cList): - content = '\n\n
\n' + content = '\n\n\n' + + return content - content = content + '
\n' + +# +# Builds the sidebar for the one-page version +# +def BuildOnePageSidebar(fs): + + content = '\n\n\n' return content + # # Create link sidebar given a position in the list. # @@ -330,12 +397,12 @@ def CreateLinkSidebar(fs, pos, childList): # Build the list recursively from the top level nodes content = BuildList(FindTopLevelNodes(fs), fs, pos, childList) - # Shove the TOC link in the top... - content = content[:7] + '
Table of Contents
\n' + content[7:] + # Shove the TOC link and one file link at the top... + active = ' class=active' if pos<0 else '' + content = content.replace('