6 ###########################################################################
11 # Naja ... etwas rumgehackt aber was solls ...
14 pathbase = len(env.Dir('#').abspath)+1
15 for module in env.Alias('all_docs')[0].sources:
16 if module.name != 'html.stamp' : continue
17 mods[module.dir.dir.dir.abspath] = [ module.dir.dir.dir.name,
18 module.dir.abspath[pathbase:],
27 if len(rv[i]) > pathbase and mod.startswith(rv[i] + '/'):
28 level = mods[rv[i]][2] + 1
30 while i < len(rv) and mods[rv[i]][2] >= level:
41 mods[mod][0] = 'lib' + mods[mod][0]
44 for name,path in EXTRA_MODULES:
45 path = env.Dir(path).dir.dir.abspath
51 while i+m < len(rv) and mods[rv[i+m]][2] > mods[rv[i]][2]:
60 return ( tuple(mods[mod]) for mod in rv )
63 ix = len(env.Dir('#').abspath)+1
64 return [ doc.dir.abspath[ix:]
65 for doc in env.Alias('all_docs')[0].sources
66 if doc.name == "search.idx" ]
68 def writeTemplate(target = None, source = None, env = None):
69 file(target[0].abspath,"w").write(yaptu.process(str(env['TEMPLATE']), globals(), env.Dictionary()))
71 writeTemplate = env.Action(writeTemplate, varlist = [ 'TEMPLATE' ])
73 ###########################################################################
75 # Extra documentation modules which are handled (named) different from
78 ('Overview', '#/doc/html'),
79 ('Examples', '#/Examples/doc/html'),
80 ('HowTo\'s', '#/HowTos/doc/html'),
81 ('SENFSCons', '#/senfscons/doc/html') ]
83 HEADER = """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
87 <link href="@TOPDIR@/doc/html/doxygen.css" rel="stylesheet" type="text/css">
88 <link href="@TOPDIR@/doclib/senf.css" rel="stylesheet" type="text/css">
89 <link rel="shortcut icon" href="@TOPDIR@/doclib/favicon.ico">
90 <style type="text/css">
91 div.tabs ul li.$projectname a { background-color: #EDE497; }
100 <form action="@TOPDIR@/doclib/search.php" method="get">
101 Search: <input type="text" name="query" size="20" accesskey="s"/>
104 <h1>SENF Extensible Network Framework</h1>
109 <li><a href="@TOPDIR@/doc/html/xref.html">Open Issues</a></li>
110 <li><a class="ext" href="http://developer.berlios.de/bugs/?group_id=7489">Bug Tracker</a></li>
111 <li><a class="ext" href="http://svn.berlios.de/viewcvs/senf/trunk/">Browse SVN</a></li>
112 <li><a class="ext" href="http://svn.berlios.de/wsvn/senf/?op=log&rev=0&sc=0&isdir=1">ChangeLog</a></li>
113 <li><a class="ext" href="http://developer.berlios.de/projects/senf">BerliOS</a></li>
114 <li><a class="ext" href="http://openfacts.berlios.de/index-en.phtml?title=SENF+Network+Framework">Wiki</a></li>
115 <li><a href="@TOPDIR@/doc/html/index.html">Home</a></li>
123 <div class="tabs menu">
125 {{ for name, path, level in modules():
126 <li class="${name} level${level}"><a href="@TOPDIR@/${path}/index.html">${name}</a></li>
131 FOOTER = """<hr style="width:0px;border:none;clear:both;margin:0;padding:0" />
136 <a href="mailto:senf-dev@lists.berlios.de">Contact: senf-dev@lists.berlios.de</a> |
137 Copyright © 2006 Fraunhofer Gesellschaft, SatCom, Stefan Bund
143 <?php include 'search_functions.php'; ?>
144 <?php search(); ?>"""
146 SEARCH_PATHS_PHP="""<?php
149 {{ for index in indices():
156 env.Command('doxy-header.html', 'SConscript', writeTemplate,
157 TEMPLATE = Literal(HEADER),
158 TITLE = "Documentation and API reference")
159 env.Command('doxy-footer.html', 'SConscript', writeTemplate,
160 TEMPLATE = Literal(FOOTER))
161 env.Alias('all_docs',
162 env.Command('search.php', [ 'html-munge.xsl', 'SConscript' ],
164 'xsltproc --nonet --html --stringparam topdir .. -o - $SOURCE $TARGET 2>/dev/null'
166 + r" -e 's/\[\[/<?/g' -e 's/\]\]/?>/g'"
167 + r" -e 's/\$$projectname/Overview/g'"
168 + r" -e 's/\$$title/Search results/g'"
169 + "> ${TARGETS[0]}.tmp",
170 'mv ${TARGET}.tmp ${TARGET}' ],
171 TEMPLATE = Literal(HEADER
172 + SEARCH_PHP.replace('<?','[[').replace('?>',']]')
174 TITLE = "Search results"))
175 env.Alias('all_docs',
176 env.Command('search_paths.php', 'SConscript', writeTemplate,
177 TEMPLATE = Literal(SEARCH_PATHS_PHP)))
179 env.Alias('install_all',
180 env.Install( '$DOCINSTALLDIR/doclib', [ 'favicon.ico',
183 'search_functions.php',
187 env.Clean('all', 'doxy-header.html') # I should not need this but I do ...
188 env.Clean('all_docs', 'doxy-header.html') # I should not need this but I do ...