[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
r5538 - in trunk/www: . utils utils/webhelpers
From: |
jcater |
Subject: |
r5538 - in trunk/www: . utils utils/webhelpers |
Date: |
Fri, 26 Mar 2004 17:12:25 -0600 (CST) |
Author: jcater
Date: 2004-03-26 17:12:25 -0600 (Fri, 26 Mar 2004)
New Revision: 5538
Added:
trunk/www/utils/webhelpers/docs.py
Modified:
trunk/www/TODO
trunk/www/utils/create-website
trunk/www/utils/webhelpers/tools.py
Log:
* Starting on /docs/ and /developers/docs/ web pages
Modified: trunk/www/TODO
===================================================================
--- trunk/www/TODO 2004-03-26 23:07:06 UTC (rev 5537)
+++ trunk/www/TODO 2004-03-26 23:12:25 UTC (rev 5538)
@@ -3,8 +3,8 @@
- Automate screenshots/
- Automate docs/ page
- Automate project/status.php
- * Add "sort by date" and "alpha sort" to shared/_listdir
* tools/
+ - Automate dependencies
- Automate */screenshots/
- Add bayonne/
* packages/
@@ -14,7 +14,7 @@
* Developer's Corner
- Design it!
- Automate technotes
- - CVS Web/LXR
+ - LXR
* contrib/
- Design!
- GNUe SB
Modified: trunk/www/utils/create-website
===================================================================
--- trunk/www/utils/create-website 2004-03-26 23:07:06 UTC (rev 5537)
+++ trunk/www/utils/create-website 2004-03-26 23:12:25 UTC (rev 5538)
@@ -3,7 +3,7 @@
from webhelpers.utils import *
-from webhelpers import news, tools, utils, htdig, twiki
+from webhelpers import news, tools, utils, htdig, twiki, docs
import sys, os, string
@@ -54,6 +54,9 @@
# Create the tools/ structure
tools.run()
+ # Create the main doc pages
+ docs.run()
+
# Create the search engine pages
try:
HTDIG=sys.argv[sys.argv.index('--htdig')+1]
Added: trunk/www/utils/webhelpers/docs.py
===================================================================
--- trunk/www/utils/webhelpers/docs.py 2004-03-26 23:07:06 UTC (rev 5537)
+++ trunk/www/utils/webhelpers/docs.py 2004-03-26 23:12:25 UTC (rev 5538)
@@ -0,0 +1,18 @@
+# Contains global create-website stuff
+from utils import *
+
+# These get set by tools.py,
+# so tools.run() needs to be run first.
+tool_list = []
+tool_docs = {}
+tool_dev_docs = {}
+
+import sys, os, string
+from StringIO import StringIO
+from helpers.files import SVN_BASE, addToolLinks, htmlify
+from helpers.tools import Tool
+from helpers.info import DatasourceInfo
+
+def run():
+
+ DEST = dest()
Modified: trunk/www/utils/webhelpers/tools.py
===================================================================
--- trunk/www/utils/webhelpers/tools.py 2004-03-26 23:07:06 UTC (rev 5537)
+++ trunk/www/utils/webhelpers/tools.py 2004-03-26 23:12:25 UTC (rev 5538)
@@ -13,11 +13,11 @@
from helpers.files import SVN_BASE, addToolLinks, htmlify
from helpers.tools import Tool
from helpers.info import DatasourceInfo
+import docs
def run():
DEST = dest()
- print "DEST=%s" % DEST
# Create the _module_menu.php for the tools/ section
#
@@ -36,6 +36,8 @@
name = mod.name
package = mod.package
+ docs.tool_list.append ((tool, name, package))
+
os.system("mkdir -p %s/tools/%s" % (DEST, tool))
os.system("mkdir -p %s/tools/%s/docs" % (DEST, tool))
os.system("mkdir -p %s/tools/%s" % (DEST, tool))
@@ -140,34 +142,53 @@
##
## Documentation
##
+ # tools/<tool>/index.php
html += '<h2>Documentation</h2>\n<ul>' #TODO
html += '<li>Frequently Asked Questions: <a
href="docs/faq.php">HTML</a></li>\n'
+ # tools/<tool>/docs/index.php
html2 = "<h1>%s Documentation</h1>\n" % package.replace('GNUe-','')
html2 += "<p>This pages contains various documentation for %s.</p>" % name
- for fileset, descr in (
- (mod.docs.userfiles, 'End User'),
- (mod.docs.devfiles,'End Developer') ):
+ # docs/index.php
+ html3 = html2
+
+ # developers/docs.php
+ html4 = ""
+ for fileset, descr, coreonly in (
+ (mod.docs.userfiles, 'End User', 0),
+ (mod.docs.devfiles,'End Developer', 0),
+ (mod.docs.corefiles,'Core Developer', 1) ):
if fileset:
- html += '<li>%s Documentation:</p><ul>\n' % descr
- html2 += '<h2>%s Documentation</h2>\n' % descr
+ if not coreonly:
+ html += '<li>%s Documentation:</p><ul>\n' % descr
+ html2 += '<h2>%s Documentation</h2>\n' % descr
+ html3 += '<h2>%s Documentation</h2>\n' % descr
for props, text in fileset:
all = []
all2 = []
+ all3 = []
for file, type in mod.docs.getTypes(props, DEST):
all.append('<a href="../..%s">%s</a>' % (file, type))
all2.append('<a href="../../..%s">%s</a>' % (file, type))
- html += ' <li>%s: %s</li>\n' % (props['name'], string.join(all,' |
'))
- html2 += '<div class="docgroup"><div
class="docheader"><b>%s</b> ( %s )</div>\n' % (props['name'],
string.join(all2,' | '))
- html2 +=
addToolLinks(htmlify(string.join(text,'\n'),'www/docs/%s.txt' % tool),
- toolUrlHints,'../..',tool) + "</div>\n"
- html += '</ul></li>\n'
+ t = '<div class="docgroup"><div
class="docheader"><b>%s</b> ( %s )</div>\n' % (props['name'],
string.join(all2,' | '))
+ t2 = htmlify(string.join(text,'\n'),'www/docs/%s.txt' % tool)
+ if not coreonly:
+ html += ' <li>%s: %s</li>\n' % (props['name'], string.join(all,'
| '))
+ html2 += t + addToolLinks(t2,toolUrlHints,'../..',tool) +
"</div>\n"
+ else:
+ html4 += t.replace('../../','') +
addToolLinks(t2,toolUrlHints,'..',tool) + "</div>\n"
+ html3 += t.replace('../../','') +
addToolLinks(t2,toolUrlHints,'../..',tool) + "</div>\n"
+ if not coreonly:
+ html += '</ul></li>\n'
+ docs.tool_docs[tool] = html3
+ docs.tool_dev_docs[tool] = html3
+
html += '<li><a href="docs/">All Available Documentation</a></li></ul>'
-
phpWrapper('tools/%s/docs/index.php' % tool, html2, name + '
Documentation')
+
##
## Release History
##
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- r5538 - in trunk/www: . utils utils/webhelpers,
jcater <=