[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
r5326 - in trunk/www: news utils utils/webhelpers web/downloads web/shar
From: |
jcater |
Subject: |
r5326 - in trunk/www: news utils utils/webhelpers web/downloads web/shared |
Date: |
Mon, 15 Mar 2004 23:25:33 -0600 (CST) |
Author: jcater
Date: 2004-03-15 23:25:31 -0600 (Mon, 15 Mar 2004)
New Revision: 5326
Added:
trunk/www/utils/webhelpers/
trunk/www/utils/webhelpers/__init__.py
trunk/www/utils/webhelpers/news.py
trunk/www/utils/webhelpers/tools.py
trunk/www/utils/webhelpers/utils.py
trunk/www/web/downloads/hourly/
trunk/www/web/downloads/nightly/
Modified:
trunk/www/news/10134
trunk/www/news/10135
trunk/www/utils/create-website
trunk/www/web/shared/_menu.php
trunk/www/web/shared/base.css
Log:
split up the create-website script into managable chunks; added news items
Modified: trunk/www/news/10134
===================================================================
--- trunk/www/news/10134 2004-03-16 02:53:50 UTC (rev 5325)
+++ trunk/www/news/10134 2004-03-16 05:25:31 UTC (rev 5326)
@@ -73,7 +73,7 @@
All of these releases are targeted at developers. The five
products are available in source form from our website at
- [http://www.gnuenterprise.org/downloads/current.php/]
+ http://www.gnuenterprise.org/downloads/current.php/
We also have an all-in-one Windows installer for the GNUe
tools that include all the basic dependencies -- you only have to
@@ -89,64 +89,70 @@
The tools have been tested and are known to run on:
- * GNU/Linux (RedHat 6.x/7.x/8.x, Debian 2.x/3.x/sid, Slackware 8.x, Gentoo)
- * Windows 95/98/2000/ME/XP/NT
- * MacOS X (via the available X interface)
- * Solaris 8/9
- * FreeBSD 4.x/5.x
+ * GNU/Linux (RedHat 6.x/7.x/8.x, Debian 2.x/3.x/sid, Slackware 8.x, Gentoo)
+ * Windows 95/98/2000/ME/XP/NT
+ * MacOS X (via the available X interface)
+ * Solaris 8/9
+ * FreeBSD 4.x/5.x
The tools require [Python 2.0] or better to run (Python 2.1+ recommended.)
Changes to GNUe-Forms 0.5.0:
-o Separated logic from layout in the Forms Definition file.
-o Introduced a <logic> section containing <block>s and <field>s.
-o Simplified the <entry> tag (layout) and tied it to a <field>
+
+- Separated logic from layout in the Forms Definition file.
+- Introduced a <logic> section containing <block>s and <field>s.
+- Simplified the <entry> tag (layout) and tied it to a <field>
tag (logic)
-o Separated layout management from the main XML specification
+- Separated layout management from the main XML specification
and implemented with namespaces.
-o Introduced dialog support
-o Startup errors are now displayed in a popup dialog instead
+- Introduced dialog support
+- Startup errors are now displayed in a popup dialog instead
of dumped to the console
-o Introduced basic data-bound image support (requires Python
+- Introduced basic data-bound image support (requires Python
Imaging Library)
-o State-based (disabled/enabled) toolbar icons and menus
-o Expanded and clarified the various triggers (some were
+- State-based (disabled/enabled) toolbar icons and menus
+- Expanded and clarified the various triggers (some were
renamed to be consistent, others were newly added)
-o Started on native QT3 and Win32-based drivers
-o Wrote a converter script for old-style GFD files
+- Started on native QT3 and Win32-based drivers
+- Wrote a converter script for old-style GFD files
Changes to GNUe-Designer 0.5.0:
-o First introduction of dockable toolbars (the Preferences
+
+- First introduction of dockable toolbars (the Preferences
dialog isn't functional yet)
-o Start of a grid-based schema editor
-o Migrated to the new Forms Definition format
-o Fully functional Event Mapping inspector
-o Reimplementation of the trigger code editor
-o Significant cleanup of internal abstraction/modularization
+- Start of a grid-based schema editor
+- Migrated to the new Forms Definition format
+- Fully functional Event Mapping inspector
+- Reimplementation of the trigger code editor
+- Significant cleanup of internal abstraction/modularization
Changes to GNUe-Common 0.5.0:
-o Start of a new schema scripter interface
-o Internal restructuring
-o API improvements
-o Misc bug fixes
+- Start of a new schema scripter interface
+- Internal restructuring
+- API improvements
+- Misc bug fixes
+
Changes to GNUe-Reports 0.1.1:
-o Updates to use common 0.5.x
-o Start of a standardized general-purpose report markup
-o Various bugfixes
+- Updates to use common 0.5.x
+- Start of a standardized general-purpose report markup
+- Various bugfixes
+
Changes to GNUe Navigator 0.0.4:
-o Updates to reflect GNUe Common 0.5.0's API
-o Miscellaneous bug fixes
+- Updates to reflect GNUe Common 0.5.0's API
+- Miscellaneous bug fixes
+
Changes to GNUe AppServer 0.0.3:
-o New API for RPC communication
-o Python Language interface
-o Start of a Class Repository
-o Updates to reflect GNUe Common 0.5.0's API
-o Miscellaneous bug fixes
+- New API for RPC communication
+- Python Language interface
+- Start of a Class Repository
+- Updates to reflect GNUe Common 0.5.0's API
+- Miscellaneous bug fixes
+
In other news, work on GNUe Integrator is under way in CVS. Also, work
on a new subproject, GNUe Small Business, is progressing rapidly. This
is a set of business applications (inventory, financials, etc) targeted
Modified: trunk/www/news/10135
===================================================================
--- trunk/www/news/10135 2004-03-16 02:53:50 UTC (rev 5325)
+++ trunk/www/news/10135 2004-03-16 05:25:31 UTC (rev 5326)
@@ -61,7 +61,7 @@
All of these releases are targeted at developers. The five
products are available in source form from our website at:
- [http://www.gnuenterprise.org/downloads/current.php]
+ http://www.gnuenterprise.org/downloads/current.php
Soon, we will update our all-in-one Windows installer for the
@@ -80,7 +80,6 @@
The tools have been tested and are known to run on:
-
* GNU/Linux (RedHat 6.x/7.x/8.x, Debian 2.x/3.x/sid,
Slackware 8.x, Gentoo)
* Windows 95/98/2000/ME/XP/NT
@@ -94,39 +93,44 @@
to run.
Changes to GNUe-Forms 0.5.1:
-o Native Win32 User Interface
-o Improved Windows Packaging
-o Support for embedable components (bonobo, ole)
-o Print screen support
-o Misc Enhancements / Bug Fixes
+- Native Win32 User Interface
+- Improved Windows Packaging
+- Support for embedable components (bonobo, ole)
+- Print screen support
+- Misc Enhancements / Bug Fixes
+
Changes to GNUe-Designer 0.5.1:
-o Major Enhancements Release
-o Undo support
-o Schema Navigator w/ Drag and Drop UI creation
-o Wizard additions and enhancements
-o Internal restructuring
-o Numerous Bug Fixes
+- Major Enhancements Release
+- Undo support
+- Schema Navigator w/ Drag and Drop UI creation
+- Wizard additions and enhancements
+- Internal restructuring
+- Numerous Bug Fixes
+
Changes to GNUe-Common 0.5.1:
-o additional schema generators (mysql, firebird)
-o More Internal restructuring
-o API improvements
-o descriptive trigger system error reports
-o Event system enhancements (dispatchAfter, cache)
-o numeric converters (roman and digits to text)
-o Misc bug fixes
+- additional schema generators (mysql, firebird)
+- More Internal restructuring
+- API improvements
+- descriptive trigger system error reports
+- Event system enhancements (dispatchAfter, cache)
+- numeric converters (roman and digits to text)
+- Misc bug fixes
+
Changes to GNUe-Reports 0.1.2:
-o Postscripts output enhancements
-o Enhanced win32 support
-o Various bugfixes
+- Postscripts output enhancements
+- Enhanced win32 support
+- Various bugfixes
+
Changes to GNUe Navigator 0.0.5:
-o Reports support fixed
-o Improved windows support
+- Reports support fixed
+- Improved windows support
+
In other news, work on our subproject, GNUe Small Business,
is still underway. This is a set of business applications
(inventory, financials, etc) targeted at Small Businesses.
Modified: trunk/www/utils/create-website
===================================================================
--- trunk/www/utils/create-website 2004-03-16 02:53:50 UTC (rev 5325)
+++ trunk/www/utils/create-website 2004-03-16 05:25:31 UTC (rev 5326)
@@ -1,20 +1,11 @@
#!/usr/bin/python
-############################################################
-# This should contain a list of all tools to publish
-ALL_TOOLS = [ 'forms','reports','appserver','navigator',
- 'designer','integrator', 'common' ]
-############################################################
-import sys, os, string
-from StringIO import StringIO
+from webhelpers.utils import *
-SVN_BASE=os.path.abspath(os.path.join(os.path.dirname(__file__),'../..'))
-sys.path.insert(0,os.path.join(SVN_BASE,'gnue-common','utils'))
+from webhelpers import news, tools, utils
-from helpers.files import addToolLinks, htmlify
-from helpers.tools import Tool
-from helpers.info import DatasourceInfo
+import sys, os, string
def run():
######
@@ -40,6 +31,9 @@
except ValueError:
DEST = "/var/www"
+ # Admittedly, not the cleanest coding, but it works.
+ utils.DEST = DEST
+
print "Writing to %s" % DEST
#
@@ -51,350 +45,14 @@
os.system('cp -R %s/www/web/* %s/ >/dev/null 2>&1' % (SVN_BASE, DEST))
os.system('find %s/ -name ".svn*" -exec rm -rf "{}" \\; >/dev/null 2>&1' %
(DEST))
- # Create the _module_menu.php for the tools/ section
- #
- moduleMenuHtml = """<h3><a href="<?php print "$BASEDIR";
?>/tools/">Developer Tools</a></h3>\n<ul>\n"""
+ # Create the news pages
+ news.run()
- # This will hold tools/index.php
- toolHomePageHtml = ""
+ # Create the tools/ structure
+ tools.run()
- #
- # Load all the tools and their information
- #
- tools = {}
- toolUrlHints = {}
- for tool in ALL_TOOLS:
- tools[tool] = mod = Tool(tool)
- name = mod.name
- package = mod.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))
- toolUrlHints[name] = tool
- if name != package.replace('-',' '):
- toolUrlHints[package.replace('-',' ')] = tool
-
-
-
- #
- # Create docs for each tool
- #
- for tool in ALL_TOOLS:
- mod = tools[tool]
- name = mod.name
- package = mod.package
-
- dfmt = '%B %d, %Y'
- currentRelease = mod.releases.getCurrentRelease()
- if currentRelease:
- currentReleaseDate = mod.releases.getReleaseDate(currentRelease, dfmt)
-
- # Handle each release:
- for release in mod.releases.releaseOrder:
- html = '<h1>%s %s</h1>' % (package, release) + \
- '<p><a href="..">%s</a> %s was released on %s.</p>\n\n' %
(name, release, mod.releases.getReleaseDate(release,dfmt))
-
- if release != currentRelease:
- html += '<p class="warn"><b>Please note:</b> This is an old version of
<i>%s</i>. The latest version is <a href="../%s/">%s</a>, released on
%s.</p>\n\n' % (name, currentRelease, currentRelease, currentReleaseDate)
-
- html += '<h2>Release Notes</h2>\n<p>The following improvements appeared
in this release:</p>\n' + \
- mod.releases.asHTML(release)
-
-
- html += '<h2>Downloads</h2>\n' + \
- """<p>%s version %s can be downloaded in source form from:</p>
- <ul><li><a
href="http://www.gnuenterprise.org/downloads/releases/%s-%s.tar.gz">%s-%s.tar.gz</a></li>
- <li><a
href="http://www.gnuenterprise.org/downloads/releases/%s-%s.zip">%s-%s.zip</a></li></ul>"""
% (
- name, release,
- package, release,
- package, release,
- package, release,
- package, release)
-
- html += '<p>For more download options, including binary packages, please
visit the main download area at <a
href="http://www.gnuenterprise.org/downloads/">http://www.gnuenterprise.org/downloads/</a>.</p>'
-
-
- phpWrapper('tools/%s/%s/index.php' % (tool, release), html,
- name + " " + currentRelease)
-
- #
- # Add tool to module menu
- #
- moduleMenuHtml += """<li><a href="<?php print "$BASEDIR"; ?>/tools/%s/"
>%s</a></li>\n""" % (tool, name.replace('GNUe ',''))
-
- #
- # Add tool to tool/ homepage
- #
- descr = mod.readme.firstParaAsHTML('INTRODUCTION')
- descr = descr.replace(name,'<a href="%s/">%s</a>' % (tool, name))
- toolHomePageHtml += ('<h2><a href="%s/">' % tool) + name.replace('GNUe
','') + '</a></h2>\n' + descr
-
- ### ###
- ### Create tool's homepage ###
- ### ###
- img = os.path.join(DEST,'tools',tool,'product.png')
- if os.path.isfile(img):
- html = """<img class="productGraphic" alt="" src="product.png"/>\n"""
-## html = """<img style=" float: right; margin: 6px 6px 10px 10px;
border: 1px solid #666;" alt="" src="product.png"/>\n"""
- else:
- html = ""
-
- html += "<h1>%s</h1>\n" % (name)
-
- ##
- ## Introduction
- ##
-
- html +=
addToolLinks(mod.readme.asHTML('Introduction'),toolUrlHints,'..',tool)
-
- if currentRelease:
- html += '<p>The current version of %s is <a href="%s/">%s</a>. Release
notes and downloads are available <a href="%s/">here</a>.</p>' % (
- name, currentRelease,currentRelease,currentRelease)
- #
- ## Dependencies
- ##
- html += '<h2>Dependencies</h2>\n'
- html += '<ul><li><a href="../common/">GNUe Common</a></li></ul>\n'
-
-
- ##
- ## Translations
- ##
- html += '<h2>International Support</h2>\n'
- if mod.translations.trans:
- html += "<p>The following languages have translations for this
tool:</p>"
- html += mod.translations.asHTML()
- else:
- html += "<p>No translations are currently available for this tool.</p>"
-
- ##
- ## Documentation
- ##
- html += '<h2>Documentation</h2>\n' #TODO
- html += '<ul><li><a href="docs/faq.php">Frequently Asked
Questions</a></li></ul>\n'
-
- ##
- ## Release History
- ##
- html += '<h2>Release History</h2>\n'
-
- if mod.releases.releaseOrder:
- html += '<ul>\n'
- for ver in mod.releases.releaseOrder[:5]:
- html += """<li>Version <a href="%s/">%s</a> released on %s</li>\n""" %
(
- ver, ver, mod.releases.getReleaseDate(ver, "%B %d, %Y"))
- else:
- html += '<p>This tool has no official releases.</p>'
-
- # Create the historical release index if needed
- if len(mod.releases.releaseOrder) > 5:
- html += """<li><a href="old_releases.php">Older releases...</a></li>\n"""
-
- html2 = '<h1>%s Release History</h1>\n' % name
- html2 += "<p>This page lists all releases for this tool. Note that some
older source files may not be available for download.</p><ul>\n"
- for ver2 in mod.releases.releaseOrder:
- html2 += """<li>Version <a href="%s/">%s</a> released on %s</li>\n"""
% (
- ver2, ver2, mod.releases.getReleaseDate(ver2, "%B %d, %Y"))
- phpWrapper('tools/%s/old_releases.php' % tool, html2 + "</ul>", name + "
Release History")
-
- if mod.releases.releaseOrder:
- html += '</ul>\n'
-
- phpWrapper('tools/%s/index.php' % tool, html, name)
-
- ##
- # Write out tool's FAQ
- #
-
- html = '<h1><a href="../..">%s</a> FAQ</h1>\n' % name
- if tool != "common":
- html += """<p>If your question isn't answered here, you may wish to
refer to GNUe Common's <a href="../../common/docs/faq.php">FAQ</a> or the main
project <a href="../../../docs/faq.php">FAQ</a></p>"""
-
- if not mod.faq.sectionOrder:
- html += "<p>There are no entries in this faq.</p>"
- else:
- for section in mod.faq.sectionOrder:
- html += "<h2>%s</h2>" % section
- html += mod.faq.asHTML(section)
-
- phpWrapper('tools/%s/docs/faq.php' % tool, html, name + " FAQ")
-
- ##
- # Write out tool's roadmap
- #
- html = '<h1><a href="./">%s</a> Roadmap</h1>\n' % name
- html += mod.featureplan.asHTML()
-
- phpWrapper('tools/%s/roadmap.php' % tool, html, name + " Roadmap")
-
- ##
- # Write out tool's extra menu
- #
- html = '<h3><a href="<?php print "$BASEDIR"; ?>/tools/%s" >%s</a></h3>' %
(tool, package.replace('-',' '))
- html += """
- <ul>
- <li><a href="<?php print "$BASEDIR"; ?>/tools/%s/">Overview</a></li>
- <li><a href="<?php print "$BASEDIR";
?>/tools/%s/roadmap.php">Roadmap</a></li>
- <li><a href="<?php print "$BASEDIR";
?>/screenshots/%s/">Screenshots</a></li>
- <li><a href="<?php print "$BASEDIR"; ?>/tools/%s/bugs.php">Bug
Reports</a></li>
- </ul>""" % (tool,tool,tool,tool)
-
- staticFile('tools/%s/_extra_menu.php'%tool, html)
-
- ##
- # Write out tools/_module_menu.php
- #
- staticFile('tools/_module_menu.php', moduleMenuHtml + "</ul>")
-
- ##
- # Write out tool/ home page
- #
- phpWrapper('tools/index.php', """
- <h1>GNUe's Developer Tools</h1>
-
- <p>GNUe Tools form the backbone of the GNUe project. These
- platform-independent, fully data-aware applications give you easy, yet
- powerful, access to your business data. GNUe works with
- <a href="common/databases/">most popular databases</a>, such as the
- free PostgreSQL, MySQL, Firebird, and SQLite
- databases, as well as the commercial Oracle, DB2, Sybase,etc,
- databases.</p>
- """ + toolHomePageHtml , "Developer Tools")
-
- ##
- # Write out tool/common/databases/ home page
- #
- dinfo = DatasourceInfo()
- html = "<h1>Supported Databases</h1>\n"
- html += "<p>The following databases are at least partially supported by GNUe
Common and the GNUe tools.</p><ul>"
- sortable = []
-
- for dbname, stuff in dinfo.vendorMap.items():
- dbinfo, driverMap = stuff
- if '(' in dbname:
- f, l = dbname.split('(',1)
- shortname = f.strip()
- h = '<li><a href="%s.php">%s</a> (%s</li>' % (dbinfo.name, f.strip(),l)
- else:
- shortname = dbname
- h= '<li><a href="%s.php">%s</a></li>' % (dbinfo.name, dbname)
- sortable.append((dbname.lower(),h))
-
- # Create individual page for each datadriver
- html2 = "<h1>"
-
- if dbinfo.bool('isfree') and dbinfo.get('url'):
- if '(' in dbname:
- html2 += '<a href="%s">%s</a> (%s</h1>' % (dbinfo.get('url'),
f.strip(),l)
- else:
- html2 += '<a href="%s">%s</a></h1>' % (dbinfo.get('url'), dbname)
- else:
- html2 += "%s</h1>" % dbname
-
-
- html2 += htmlify(dbinfo.get('description','No description was provided for
this database/connection type.'), 'datasources/%s/Info.py: description' %
dbinfo.name)
-
- html2 += "\n<p>To utilize %s within GNUe, you must use one of the
following python drivers:</p>\n<ul>" % shortname
-
- sort2 = []
- for dr, db in driverMap.items():
- sort2.append((dr.lower(), dr, db))
- sort2.sort()
-
- html3 = ""
- for foo, drname, drinfo in sort2:
- html2 += '<li><a href="#%s">%s</a></li>\n' % (drinfo.name, drname)
- html3 += '<h2><a name="%s">%s</a></h2>\n' % (drinfo.name, drname)
- url = drinfo.get('url')
-
- sh = drinfo.subheaded('doc')
- if sh.sections[None]:
- html3 += sh.asHTML(None)
-
- html3 += sh.asHTML('Description', 'No description was provided for
driver.')
-
- html3 += '<!-- div class="indent" -->'
- if url:
- html3 += '<p>Home Page: <a href="%s">%s</a></p>' % (url, url)
- else:
- html3 += '<p>Home Page: <i>n/a</i></p>'
-
- if sh.asText('Support',''):
- html3 += sh.asHTML('Support')
-
- html3 += '<!-- /div -->'
-
- for sec in sh.sectionOrder:
- if sec.upper() in ('DESCRIPTION','SUPPORT'):
- continue
- html3 += '<h3>%s</h3>\n' % sec
- if sec.upper() == 'EXAMPLES':
- html3 += "<p>The following is an example of a connection.conf
entry:</p>\n" + sh.asPreHTML(sec)
- elif sec.upper() == 'CONNECTION PROPERTIES':
- html3 += "<p>The following properties can be specified in your
connections.conf file:</p>\n"
- ht = sh.asHTML(sec)
- for line in ht.split('\n'):
- if '--' in line and '<li>' in line:
- line = line.replace('--','</b>
--').replace('<li>','<li><b>').replace('<b> ','<b>')
- html3 += line + '\n'
- else:
- html3 += sh.asHTML(sec)
-
-
- html2 += '</ul>\n\n' + html3
-
- phpWrapper('tools/common/databases/%s.php' % dbinfo.name,html2,
- 'Support for %s'%shortname)
-
- # write database home page
- sortable.sort()
- for dbname, h in sortable:
- html += h + '\n'
-
- html += "</ul>"
-
- phpWrapper('tools/common/databases/index.php',html,'Supported Databases')
-
-# if dbinfo.bool('isfree') and dbinfo.get('url'):
-# if '(' in dbname:
-# f, l = dbname.split('(',1)
-# h = '<li><a href="%s">%s</a> (%s</li>' % (dbinfo.get('url'),
f.strip(),l)
-# else:
-# h= '<li><a href="%s">%s</a></li>' % (dbinfo.get('url'), dbname)
-# else:
-# h = "<li>%s</li>" % dbname
-
-######################################################################
-#
-#
-def phpWrapper(file, html, title=""):
- path = file.split('/')
- os.system('mkdir -p %s/%s' % (DEST,string.join(path[:-1],'/')))
- out = open(os.path.join(DEST, file),'w')
-
- out.write("""\
-<?php $BASEDIR="%s";
- $MODULE="%s";
- $TITLE="%s";
- include ("$BASEDIR/shared/_header.php"); ?>
-
-<div id="body">
-""" % (string.join([".."]*(len(path)-1),'/'), path[0], title))
-
- out.write(html)
- out.write("""
-</div>
-
-<?php include "$BASEDIR/shared/_footer.php"; ?>
-""")
- out.close()
-
-def staticFile(file, html):
- out = open(os.path.join(DEST, file),'w')
- out.write(html)
- out.close()
-
if __name__ == '__main__':
run()
+
Added: trunk/www/utils/webhelpers/__init__.py
===================================================================
Added: trunk/www/utils/webhelpers/news.py
===================================================================
--- trunk/www/utils/webhelpers/news.py 2004-03-16 02:53:50 UTC (rev 5325)
+++ trunk/www/utils/webhelpers/news.py 2004-03-16 05:25:31 UTC (rev 5326)
@@ -0,0 +1,78 @@
+# Contains global create-website stuff
+from utils import *
+
+from helpers import rst
+
+from xml.sax.saxutils import escape
+import sys, os, string, glob, time
+
+NEWS_PER_PAGE = 10
+
+def run():
+
+ files = glob.glob('%s/www/news/[0-9]*' % SVN_BASE)
+ files.sort()
+ files.reverse() # Latest news first
+
+ newsPage = '<div class="newslist"><h1>News Items</h1>\n<p>To read any news
item, click on the title. If you have any news to be listed here, email <a
href="mailto:address@hidden">address@hidden</a>.</p><ul>'
+
+ newscount = 0
+ for newsf in files:
+ news = NewsItem(newsf)
+ html = '<div class="newsitem"><h1>%s</h1><p><div class="newsinfo">%s<br>
<a href="mailto:%s">%s</a></div></p>\n'% (escape(news.title), news.date,
news.author, news.author)
+
+ phpWrapper('project/news/%s.php' % news.item, html + news.html + "</div>",
+ escape(news.title))
+
+ newsPage += '<li><a href="%s.php">%s</a> <div class="newsinfo">by <a
href="mailto:%s">%s</a> on %s</div></li>' % (news.item, escape(news.title),
news.author, news.author, news.date)
+
+ newsPage += '</ul></div>'
+ phpWrapper('project/news/index.php', newsPage,
+ 'News Items')
+
+class NewsItem:
+ def __init__(self, file):
+ DEST = dest()
+ self.item = item = file.split('/')[-1]
+
+ inp = open(file)
+ line = inp.readline().strip()
+ self.title = ""
+ self.author = ""
+ self.date = ""
+
+ while line:
+ fld, val = line.split(':',1)
+ val = val.strip()
+
+ if fld.upper() == 'TITLE':
+ self.title = val
+ elif fld.upper() == 'AUTHOR':
+ self.author = val
+ elif fld.upper() == 'DATE':
+ try:
+ self.date = time.strftime('%b %d, %Y', time.strptime(val,'%Y-%m-%d'))
+ except ValueError:
+ print "WARNING: News item %s has invalid date %s" % (item, val)
+ self.date = "??"
+ else:
+ print "WARNING: News item %s has invalid header %s" % (item, fld)
+ line = inp.readline().strip()
+
+ if not self.title:
+ print "WARNING: News item %s is missing a title" % (item)
+ if not self.author:
+ print "WARNING: News item %s is missing a author" % (item)
+ if not self.date:
+ print "WARNING: News item %s is missing a date" % (item)
+
+ txt = inp.read()
+ inp.close()
+
+ errors = []
+ self.html = rst.parse_string (txt,errors).to_html(1)
+ if errors:
+ print "WARNING: StructuredText in news item %s had errors:" % item
+ for msg, line, fatal in errors:
+ print " Line %s: %s" % (line, msg)
+
Added: trunk/www/utils/webhelpers/tools.py
===================================================================
--- trunk/www/utils/webhelpers/tools.py 2004-03-16 02:53:50 UTC (rev 5325)
+++ trunk/www/utils/webhelpers/tools.py 2004-03-16 05:25:31 UTC (rev 5326)
@@ -0,0 +1,335 @@
+
+############################################################
+# This should contain a list of all tools to publish
+ALL_TOOLS = [ 'forms','reports','appserver','navigator',
+ 'designer','integrator', 'common' ]
+############################################################
+
+# Contains global create-website stuff
+from utils import *
+
+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()
+
+ # Create the _module_menu.php for the tools/ section
+ #
+ moduleMenuHtml = """<h3><a href="<?php print "$BASEDIR";
?>/tools/">Developer Tools</a></h3>\n<ul>\n"""
+
+ # This will hold tools/index.php
+ toolHomePageHtml = ""
+
+ #
+ # Load all the tools and their information
+ #
+ tools = {}
+ toolUrlHints = {}
+ for tool in ALL_TOOLS:
+ tools[tool] = mod = Tool(tool)
+ name = mod.name
+ package = mod.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))
+
+ toolUrlHints[name] = tool
+ if name != package.replace('-',' '):
+ toolUrlHints[package.replace('-',' ')] = tool
+
+
+
+ #
+ # Create docs for each tool
+ #
+ for tool in ALL_TOOLS:
+ mod = tools[tool]
+ name = mod.name
+ package = mod.package
+
+ dfmt = '%B %d, %Y'
+ currentRelease = mod.releases.getCurrentRelease()
+ if currentRelease:
+ currentReleaseDate = mod.releases.getReleaseDate(currentRelease, dfmt)
+
+ # Handle each release:
+ for release in mod.releases.releaseOrder:
+ html = '<h1>%s %s</h1>' % (package, release) + \
+ '<p><a href="..">%s</a> %s was released on %s.</p>\n\n' %
(name, release, mod.releases.getReleaseDate(release,dfmt))
+
+ if release != currentRelease:
+ html += '<p class="warn"><b>Please note:</b> This is an old version of
<i>%s</i>. The latest version is <a href="../%s/">%s</a>, released on
%s.</p>\n\n' % (name, currentRelease, currentRelease, currentReleaseDate)
+
+ html += '<h2>Release Notes</h2>\n<p>The following improvements appeared
in this release:</p>\n' + \
+ mod.releases.asHTML(release)
+
+
+ html += '<h2>Downloads</h2>\n' + \
+ """<p>%s version %s can be downloaded in source form from:</p>
+ <ul><li><a
href="http://www.gnuenterprise.org/downloads/releases/%s-%s.tar.gz">%s-%s.tar.gz</a></li>
+ <li><a
href="http://www.gnuenterprise.org/downloads/releases/%s-%s.zip">%s-%s.zip</a></li></ul>"""
% (
+ name, release,
+ package, release,
+ package, release,
+ package, release,
+ package, release)
+
+ html += '<p>For more download options, including binary packages, please
visit the main download area at <a
href="http://www.gnuenterprise.org/downloads/">http://www.gnuenterprise.org/downloads/</a>.</p>'
+
+
+ phpWrapper('tools/%s/%s/index.php' % (tool, release), html,
+ name + " " + currentRelease)
+
+ #
+ # Add tool to module menu
+ #
+ moduleMenuHtml += """<li><a href="<?php print "$BASEDIR"; ?>/tools/%s/"
>%s</a></li>\n""" % (tool, name.replace('GNUe ',''))
+
+ #
+ # Add tool to tool/ homepage
+ #
+ descr = mod.readme.firstParaAsHTML('INTRODUCTION')
+ descr = descr.replace(name,'<a href="%s/">%s</a>' % (tool, name))
+ toolHomePageHtml += ('<h2><a href="%s/">' % tool) + name.replace('GNUe
','') + '</a></h2>\n' + descr
+
+ ### ###
+ ### Create tool's homepage ###
+ ### ###
+ img = os.path.join(DEST,'tools',tool,'product.png')
+ if os.path.isfile(img):
+ html = """<img class="productGraphic" alt="" src="product.png"/>\n"""
+## html = """<img style=" float: right; margin: 6px 6px 10px 10px;
border: 1px solid #666;" alt="" src="product.png"/>\n"""
+ else:
+ html = ""
+
+ html += "<h1>%s</h1>\n" % (name)
+
+ ##
+ ## Introduction
+ ##
+
+ html +=
addToolLinks(mod.readme.asHTML('Introduction'),toolUrlHints,'..',tool)
+
+ if currentRelease:
+ html += '<p>The current version of %s is <a href="%s/">%s</a>. Release
notes and downloads are available <a href="%s/">here</a>.</p>' % (
+ name, currentRelease,currentRelease,currentRelease)
+ #
+ ## Dependencies
+ ##
+ html += '<h2>Dependencies</h2>\n'
+ html += '<ul><li><a href="../common/">GNUe Common</a></li></ul>\n'
+
+
+ ##
+ ## Translations
+ ##
+ html += '<h2>International Support</h2>\n'
+ if mod.translations.trans:
+ html += "<p>The following languages have translations for this
tool:</p>"
+ html += mod.translations.asHTML()
+ else:
+ html += "<p>No translations are currently available for this tool.</p>"
+
+ ##
+ ## Documentation
+ ##
+ html += '<h2>Documentation</h2>\n' #TODO
+ html += '<ul><li><a href="docs/faq.php">Frequently Asked
Questions</a></li></ul>\n'
+
+ ##
+ ## Release History
+ ##
+ html += '<h2>Release History</h2>\n'
+
+ if mod.releases.releaseOrder:
+ html += '<ul>\n'
+ for ver in mod.releases.releaseOrder[:5]:
+ html += """<li>Version <a href="%s/">%s</a> released on %s</li>\n""" %
(
+ ver, ver, mod.releases.getReleaseDate(ver, "%B %d, %Y"))
+ else:
+ html += '<p>This tool has no official releases.</p>'
+
+ # Create the historical release index if needed
+ if len(mod.releases.releaseOrder) > 5:
+ html += """<li><a href="old_releases.php">Older releases...</a></li>\n"""
+
+ html2 = '<h1>%s Release History</h1>\n' % name
+ html2 += "<p>This page lists all releases for this tool. Note that some
older source files may not be available for download.</p><ul>\n"
+ for ver2 in mod.releases.releaseOrder:
+ html2 += """<li>Version <a href="%s/">%s</a> released on %s</li>\n"""
% (
+ ver2, ver2, mod.releases.getReleaseDate(ver2, "%B %d, %Y"))
+ phpWrapper('tools/%s/old_releases.php' % tool, html2 + "</ul>", name + "
Release History")
+
+ if mod.releases.releaseOrder:
+ html += '</ul>\n'
+
+ phpWrapper('tools/%s/index.php' % tool, html, name)
+
+ ##
+ # Write out tool's FAQ
+ #
+
+ html = '<h1><a href="../..">%s</a> FAQ</h1>\n' % name
+ if tool != "common":
+ html += """<p>If your question isn't answered here, you may wish to
refer to GNUe Common's <a href="../../common/docs/faq.php">FAQ</a> or the main
project <a href="../../../docs/faq.php">FAQ</a></p>"""
+
+ if not mod.faq.sectionOrder:
+ html += "<p>There are no entries in this faq.</p>"
+ else:
+ for section in mod.faq.sectionOrder:
+ html += "<h2>%s</h2>" % section
+ html += mod.faq.asHTML(section)
+
+ phpWrapper('tools/%s/docs/faq.php' % tool, html, name + " FAQ")
+
+ ##
+ # Write out tool's roadmap
+ #
+ html = '<h1><a href="./">%s</a> Roadmap</h1>\n' % name
+ html += mod.featureplan.asHTML()
+
+ phpWrapper('tools/%s/roadmap.php' % tool, html, name + " Roadmap")
+
+ ##
+ # Write out tool's extra menu
+ #
+ html = '<h3><a href="<?php print "$BASEDIR"; ?>/tools/%s" >%s</a></h3>' %
(tool, package.replace('-',' '))
+ html += """
+ <ul>
+ <li><a href="<?php print "$BASEDIR"; ?>/tools/%s/">Overview</a></li>
+ <li><a href="<?php print "$BASEDIR";
?>/tools/%s/roadmap.php">Roadmap</a></li>
+ <li><a href="<?php print "$BASEDIR";
?>/screenshots/%s/">Screenshots</a></li>
+ <li><a href="<?php print "$BASEDIR"; ?>/tools/%s/bugs.php">Bug
Reports</a></li>
+ </ul>""" % (tool,tool,tool,tool)
+
+ staticFile('tools/%s/_extra_menu.php'%tool, html)
+
+ ##
+ # Write out tools/_module_menu.php
+ #
+ staticFile('tools/_module_menu.php', moduleMenuHtml + "</ul>")
+
+ ##
+ # Write out tool/ home page
+ #
+ phpWrapper('tools/index.php', """
+ <h1>GNUe's Developer Tools</h1>
+
+ <p>GNUe Tools form the backbone of the GNUe project. These
+ platform-independent, fully data-aware applications give you easy, yet
+ powerful, access to your business data. GNUe works with
+ <a href="common/databases/">most popular databases</a>, such as the
+ free PostgreSQL, MySQL, Firebird, and SQLite
+ databases, as well as the commercial Oracle, DB2, Sybase,etc,
+ databases.</p>
+ """ + toolHomePageHtml , "Developer Tools")
+
+ ##
+ # Write out tool/common/databases/ home page
+ #
+ dinfo = DatasourceInfo()
+ html = "<h1>Supported Databases</h1>\n"
+ html += "<p>The following databases are at least partially supported by GNUe
Common and the GNUe tools.</p><ul>"
+ sortable = []
+
+ for dbname, stuff in dinfo.vendorMap.items():
+ dbinfo, driverMap = stuff
+ if '(' in dbname:
+ f, l = dbname.split('(',1)
+ shortname = f.strip()
+ h = '<li><a href="%s.php">%s</a> (%s</li>' % (dbinfo.name, f.strip(),l)
+ else:
+ shortname = dbname
+ h= '<li><a href="%s.php">%s</a></li>' % (dbinfo.name, dbname)
+ sortable.append((dbname.lower(),h))
+
+ # Create individual page for each datadriver
+ html2 = "<h1>"
+
+ if dbinfo.bool('isfree') and dbinfo.get('url'):
+ if '(' in dbname:
+ html2 += '<a href="%s">%s</a> (%s</h1>' % (dbinfo.get('url'),
f.strip(),l)
+ else:
+ html2 += '<a href="%s">%s</a></h1>' % (dbinfo.get('url'), dbname)
+ else:
+ html2 += "%s</h1>" % dbname
+
+
+ html2 += htmlify(dbinfo.get('description','No description was provided for
this database/connection type.'), 'datasources/%s/Info.py: description' %
dbinfo.name)
+
+ html2 += "\n<p>To utilize %s within GNUe, you must use one of the
following python drivers:</p>\n<ul>" % shortname
+
+ sort2 = []
+ for dr, db in driverMap.items():
+ sort2.append((dr.lower(), dr, db))
+ sort2.sort()
+
+ html3 = ""
+ for foo, drname, drinfo in sort2:
+ html2 += '<li><a href="#%s">%s</a></li>\n' % (drinfo.name, drname)
+ html3 += '<h2><a name="%s">%s</a></h2>\n' % (drinfo.name, drname)
+ url = drinfo.get('url')
+
+ sh = drinfo.subheaded('doc')
+ if sh.sections[None]:
+ html3 += sh.asHTML(None)
+
+ html3 += sh.asHTML('Description', 'No description was provided for
driver.')
+
+ html3 += '<!-- div class="indent" -->'
+ if url:
+ html3 += '<p>Home Page: <a href="%s">%s</a></p>' % (url, url)
+ else:
+ html3 += '<p>Home Page: <i>n/a</i></p>'
+
+ if sh.asText('Support',''):
+ html3 += sh.asHTML('Support')
+
+ html3 += '<!-- /div -->'
+
+ for sec in sh.sectionOrder:
+ if sec.upper() in ('DESCRIPTION','SUPPORT'):
+ continue
+ html3 += '<h3>%s</h3>\n' % sec
+ if sec.upper() == 'EXAMPLES':
+ html3 += "<p>The following is an example of a connection.conf
entry:</p>\n" + sh.asPreHTML(sec)
+ elif sec.upper() == 'CONNECTION PROPERTIES':
+ html3 += "<p>The following properties can be specified in your
connections.conf file:</p>\n"
+ ht = sh.asHTML(sec)
+ for line in ht.split('\n'):
+ if '--' in line and '<li>' in line:
+ line = line.replace('--','</b>
--').replace('<li>','<li><b>').replace('<b> ','<b>')
+ html3 += line + '\n'
+ else:
+ html3 += sh.asHTML(sec)
+
+
+ html2 += '</ul>\n\n' + html3
+
+ phpWrapper('tools/common/databases/%s.php' % dbinfo.name,html2,
+ 'Support for %s'%shortname)
+
+ # write database home page
+ sortable.sort()
+ for dbname, h in sortable:
+ html += h + '\n'
+
+ html += "</ul>"
+
+ phpWrapper('tools/common/databases/index.php',html,'Supported Databases')
+
+# if dbinfo.bool('isfree') and dbinfo.get('url'):
+# if '(' in dbname:
+# f, l = dbname.split('(',1)
+# h = '<li><a href="%s">%s</a> (%s</li>' % (dbinfo.get('url'),
f.strip(),l)
+# else:
+# h= '<li><a href="%s">%s</a></li>' % (dbinfo.get('url'), dbname)
+# else:
+# h = "<li>%s</li>" % dbname
+
Property changes on: trunk/www/utils/webhelpers/tools.py
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/www/utils/webhelpers/utils.py
===================================================================
--- trunk/www/utils/webhelpers/utils.py 2004-03-16 02:53:50 UTC (rev 5325)
+++ trunk/www/utils/webhelpers/utils.py 2004-03-16 05:25:31 UTC (rev 5326)
@@ -0,0 +1,36 @@
+
+import sys, os, string
+
+
+SVN_BASE=os.path.abspath(os.path.join(os.path.dirname(__file__),'../../..'))
+sys.path.insert(0,os.path.join(SVN_BASE,'gnue-common','utils'))
+
+def phpWrapper(file, html, title=""):
+ path = file.split('/')
+ os.system('mkdir -p %s/%s' % (DEST,string.join(path[:-1],'/')))
+ out = open(os.path.join(DEST, file),'w')
+
+ out.write("""\
+<?php $BASEDIR="%s";
+ $MODULE="%s";
+ $TITLE="%s";
+ include ("$BASEDIR/shared/_header.php"); ?>
+
+<div id="body">
+""" % (string.join([".."]*(len(path)-1),'/'), path[0], title))
+
+ out.write(html)
+ out.write("""
+</div>
+
+<?php include "$BASEDIR/shared/_footer.php"; ?>
+""")
+ out.close()
+
+def staticFile(file, html):
+ out = open(os.path.join(DEST, file),'w')
+ out.write(html)
+ out.close()
+
+def dest():
+ return DEST
\ No newline at end of file
Modified: trunk/www/web/shared/_menu.php
===================================================================
--- trunk/www/web/shared/_menu.php 2004-03-16 02:53:50 UTC (rev 5325)
+++ trunk/www/web/shared/_menu.php 2004-03-16 05:25:31 UTC (rev 5326)
@@ -3,7 +3,8 @@
<ul>
<li><a href="<?php print "$BASEDIR"; ?>/project/news/" >Project
News</a></li>
- <li><a href="http://www.gnuenterprise.org/downloads/downloads.php"
>Downloads</a></li>
+<!-- <li><a href="http://www.gnuenterprise.org/downloads/"
>Downloads</a></li> -->
+ <li><a href="<?php print "$BASEDIR"; ?>/downloads/" >Downloads</a></li>
<li><a href="<?php print "$BASEDIR"; ?>/docs/" >Documentation</a></li>
<li><a href="<?php print "$BASEDIR"; ?>/project/screenshots.html"
>Screenshots</a></li>
<li><a href="<?php print "$BASEDIR"; ?>/project/bugs.html" >Bug
Tracking</a></li>
Modified: trunk/www/web/shared/base.css
===================================================================
--- trunk/www/web/shared/base.css 2004-03-16 02:53:50 UTC (rev 5325)
+++ trunk/www/web/shared/base.css 2004-03-16 05:25:31 UTC (rev 5326)
@@ -148,7 +148,7 @@
ul,ol {
margin: 2px 0 0 0;
- padding-left: 18pt;
+ padding-left: 20pt;
}
li {
@@ -159,6 +159,7 @@
ul {
list-style-type: circle;
}
+
p {
font-size: 12px;
margin-top: 8px;
@@ -247,3 +248,24 @@
td.fpFinished2 {
background-color: #eeffee;
}
+
+/* News page */
+div.newsitem div.newsinfo {
+ font-size: 11px;
+ font-style: italic;
+ text-align: right;
+ margin-top: -5px;
+ margin-left: 10px;
+ margin-bottom: 10px;
+ padding-left: 10px;
+ padding-bottom: 5px;
+ padding-right: 10px;
+ border-width: thin;
+ border-style: none dashed dashed dashed;
+ float: right;
+}
+
+div.newslist div.newsinfo {
+ display: inline;
+ margin-left: 5px;
+}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- r5326 - in trunk/www: news utils utils/webhelpers web/downloads web/shared,
jcater <=