Updated appyframeworg.org generated site.

This commit is contained in:
Gaetan Delannay 2010-05-03 12:57:24 +02:00
parent cb216a9e9c
commit 74d28a76c0
14 changed files with 51 additions and 174 deletions

View file

@ -1,6 +1,6 @@
#!/usr/bin/python2.4.4
# Imports ----------------------------------------------------------------------
import os, os.path, shutil, re, zipfile, sys, ftplib
import os, os.path, shutil, re, zipfile, sys, ftplib, time
from appy.shared import appyPath
from appy.shared.utils import FolderDeleter
from appy.bin.clean import Cleaner
@ -227,51 +227,6 @@ class Text2Html:
self.txtFile.close()
self.htmlFile.close()
class VersionsConverter(Text2Html):
title = 'Versions'
firstChar = 0
svnUrl = 'http://svn.communesplone.org/svn/communesplone/appy'
setupToolsUrl = 'http://peak.telecommunity.com/DevCenter/setuptools'
def retainLine(self, line):
return len(line) > 1
def getCleanLine(self, line, isTitle=False):
line = Text2Html.getCleanLine(self, line, isTitle)
if isTitle:
# This title represents a version of the appy framework.
version = versionRex.search(line).group(1)
if os.path.exists('%s/versions/appy.%s.zip' % (
appyPath, version)):
line = '%s (download <a href="versions/appy.%s.zip">zip</a>)' %(
line, version)
return line
def getProlog(self):
return '<p>Appy releases are available for download as zip files ' \
'below. Under Windows, unzip the file with a tool like ' \
'<a href="http://www.7-zip.org/">7zip</a> and copy the ' \
'"appy" folder to &lt;where_you_installed_python&gt;\Lib\s' \
'ite-packages\. Under Linux, unzip the file by typing "unzip ' \
'appy-x.x.x.zip", copy the appy folder wherever you want (in ' \
'/opt/appy for example) and make a symbolic link in your ' \
'Python lib folder (for example: "ln -s /opt/appy /usr/lib/' \
'python2.5/site-packages/appy").</p>' \
'<!--p>Appy releases are also available as eggs. In order to ' \
'install an appy egg, install setuptools ' \
'(more info on <a href="%s">%s</a>) and type "sudo ' \
'easy_install appy".</p--> ' \
'<p> In order to check that everything works, launch a Python ' \
'shell and type "import appy". If you get the &gt;&gt;&gt; '\
'prompt again without error it\'s ok. You may also want to ' \
'launch the automated pod test suite: go to the pod test ' \
'folder (in &lt;pod folder&gt;/test, where &lt;pod ' \
'folder&gt; may be something like /usr/lib/python2.5/' \
'site-packages/appy/pod or /usr/lib/python2.5/site-packages/' \
'appy-0.3.0-py2.5.egg/appy/pod) and type "sudo python ' \
'Tester.py".</p>' \
'<!--p>You may also access directly the SVN repository of ' \
'the project: <a href="%s">%s</a>.</p-->' % (
self.setupToolsUrl, self.setupToolsUrl,
self.svnUrl, self.svnUrl)
# ------------------------------------------------------------------------------
class Publisher:
'''Publishes Appy on the web.'''
@ -286,10 +241,10 @@ class Publisher:
# Retrieve version-related information
versionFileName = '%s/doc/version.txt' % appyPath
f = file(versionFileName)
self.versionLong = f.readline().strip()
# Long version includes version number & date
self.versionShort = versionRex.search(self.versionLong).group(1).strip()
# Short version includes version number only
self.versionShort = f.read().strip()
# Long version includes release date
self.versionLong = '%s (%s)' % (self.versionShort,
time.strftime('%Y/%m/%d %H:%M'))
f.close()
def executeCommand(self, cmd):
@ -298,23 +253,8 @@ class Publisher:
os.system(cmd)
def createCodeAndEggReleases(self):
'''Updates the subversion repository as needed (tags, branches)
and publishes the needed eggs on pypi.python.org.'''
# Update subversion repository
'''Publishes the egg on pypi.python.org.'''
curdir = os.getcwd()
# Create a branch for this new version if the user wants it.
lastDotIndex = self.versionShort.rfind('.')
branchName = self.versionShort[:lastDotIndex]
cmd = 'svn cp -m "Branch for releases %s.x" %s/trunk %s/branches/%s' % (
branchName, self.svnServer, self.svnServer, branchName)
if askQuestion('Create new branch? (%s)' % cmd, default='no'):
os.system(cmd)
# Create a tag for this version if the user wants it.
tagUrl = '%s/tags/%s' % (self.svnServer, self.versionShort)
cmd = 'svn cp -m "Tag for release %s" %s/trunk %s' % (
self.versionShort, self.svnServer, tagUrl)
if askQuestion('Create new tag? (%s)' % cmd, default='no'):
os.system(cmd)
if askQuestion('Upload eggs on PyPI?', default='no'):
# Create egg structure
eggFolder = '%s/egg' % self.genFolder
@ -347,7 +287,7 @@ class Publisher:
def createZipRelease(self):
'''Creates a zip file with the appy sources.'''
newZipRelease = '%s/versions/appy.%s.zip' % (appyPath, self.versionShort)
newZipRelease = '%s/versions/appy%s.zip' % (appyPath, self.versionShort)
if os.path.exists(newZipRelease):
if not askQuestion('"%s" already exists. Replace it?' % \
newZipRelease, default='yes'):
@ -364,9 +304,9 @@ class Publisher:
zipFile.write(fileName)
# [2:] is there to avoid havin './' in the path in the zip file.
zipFile.close()
# Copy the new zip release to the gen folder
shutil.copy(newZipRelease, '%s/versions' % self.genFolder)
os.chdir(curdir)
# Remove the "appy" folder within the gen folder.
FolderDeleter.delete(os.path.join(self.genFolder, 'appy'))
def applyTemplate(self):
'''Decorates each page with the template.'''
@ -401,7 +341,7 @@ class Publisher:
res = produceNiceMessage(res[3:])
return res
mainToc = re.compile('<td class="doc"(.*?)</td>')
mainToc = re.compile('<span class="doc"(.*?)</span>', re.S)
tocLink = re.compile('<a href="(.*?)">(.*?)</a>')
subSection = re.compile('<h1>(.*?)</h1>')
subSectionContent = re.compile('<a name="(.*?)">.*?</a>(.*)')
@ -461,11 +401,10 @@ class Publisher:
if os.path.exists(self.genFolder):
FolderDeleter.delete(self.genFolder)
shutil.copytree('%s/doc' % appyPath, self.genFolder)
shutil.copytree('%s/versions' % appyPath, '%s/versions' %self.genFolder)
# Create a temp clean copy of appy sources (without .svn folders, etc)
genSrcFolder = '%s/appy' % self.genFolder
os.mkdir(genSrcFolder)
for aFile in ('__init__.py',):
for aFile in ('__init__.py', 'install.txt'):
shutil.copy('%s/%s' % (appyPath, aFile), genSrcFolder)
for aFolder in ('gen', 'pod', 'shared', 'bin'):
shutil.copytree('%s/%s' % (appyPath, aFolder),
@ -490,9 +429,6 @@ class Publisher:
for dirName in dirs:
if dirName == '.svn':
FolderDeleter.delete(os.path.join(root, dirName))
# Generates the "versions" page, based on version.txt
VersionsConverter('%s/doc/version.txt' % appyPath,
'%s/version.html' % self.genFolder).run()
def run(self):
Cleaner().run(verbose=False)
@ -501,7 +437,7 @@ class Publisher:
self.createDocToc()
self.applyTemplate()
self.createZipRelease()
self.createCodeAndEggReleases()
#self.createCodeAndEggReleases()
if askQuestion('Do you want to publish the site on ' \
'appyframework.org?', default='no'):
AppySite().publish()

View file

@ -7,19 +7,19 @@ a:hover { COLOR: #888888; text-decoration: underline; }
input {
font-family: Verdana;
font-size: 9pt;
font-size: 10pt;
font-weight:normal;
}
textarea {
font-family: Verdana;
font-size: 9pt;
font-size: 10pt;
width: auto;
}
select {
font-family: Verdana, helvetica, sans-serif;
font-size: 9pt;
font-size: 10pt;
font-weight:normal;
width: auto;
}
@ -35,12 +35,12 @@ tr {
td {
font-family: Verdana, helvetica, sans-serif;
font-size: 9pt;
font-size: 10pt;
}
th {
font-family: Verdana, helvetica, sans-serif;
font-size: 9pt;
font-size: 10pt;
font-style: italic;
font-weight: bold;
padding: 0 1em 0.1em 0;
@ -50,7 +50,7 @@ th {
p {
font-family: Verdana, helvetica, sans-serif;
font-size: 9pt;
font-size: 10pt;
}
img {
@ -59,7 +59,7 @@ img {
div {
font-family: Verdana, helvetica, sans-serif;
font-size: 9pt;
font-size: 10pt;
}
body {
@ -76,20 +76,20 @@ h1 {
h2 {
font-family: Verdana, helvetica, sans-serif;
font-size: 10pt;
font-size: 11pt;
font-style: italic;
font-weight: normal;
}
ul {
font-family: Verdana, helvetica, sans-serif;
font-size: 9pt;
font-size: 10pt;
list-style-type:circle;
}
li {
font-family: Verdana, helvetica, sans-serif;
font-size: 9pt;
font-size: 10pt;
}
/* Classes */
@ -113,18 +113,19 @@ li {
.siteTitle {
font-size: 12pt;
padding-left: 10px;
}
.headerStrip {
text-align: right;
font-size: 10pt;
font-size: 11pt;
font-style: italic;
background-color: #f1f1ed;
padding-right: 1em;
}
.bottomStrip {
font-size: 9pt;
font-size: 10pt;
font-weight:bold;
background-color: #F8F8F8;
padding-bottom: 0.1em;
@ -132,15 +133,13 @@ li {
}
.doc {
padding-left: 2em;
padding-top: 0.5em;
font-size: 9pt;
padding-left: 14px;
font-style: italic;
}
.tabs {
padding-left: 1em;
font-size: 9pt;
font-size: 10pt;
}
.footer {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
doc/img/appy.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
doc/img/forum.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -18,23 +18,17 @@
<table width="100%" align="left">
<tr>
<td class="borders">
<table cellspacing="0" cellpadding="0" width="100%">
<tr>
<td colspan="2" class="siteTitle">The <b>Appy</b> framework
<span class="tabs" align="left">
<a href="/"><img src="img/home.png"/>&nbsp;Home</a>
<a href="version.html"><img src="img/download.gif"/>&nbsp;Download</a>
<a href="javascript:sendMail('appyframework.org', 'info')"><img src="img/contact.gif"/>&nbsp;Contact</a>
<a href="todo.html"><img src="img/todo.gif"/>&nbsp;To do</a>
</span>
</td>
<td align="right" rowspan="2"><img src="img/advisory.png"/>
</td>
</tr>
<tr>
<td class="doc" colspan="3"><a href="docToc.html">Documentation</a> | <a href="gen.html">gen</a> - creating <a href="genCreatingBasicClasses.html">basic</a> and <a href="genCreatingAdvancedClasses.html">advanced</a> classes - <a href="genSecurityAndWorkflows.html">security and workflows</a> | <a href="pod.html">pod</a> - creating <a href="podWritingTemplates.html">basic</a> and <a href="podWritingAdvancedTemplates.html">advanced</a> templates - <a href="podRenderingTemplates.html">rendering</a> templates</td>
</tr>
</table>
<img src="img/appy.jpg" align="left"/>
<img src="img/advisory.png" align="right"/>
<span class="siteTitle">The <b>Appy</b> framework</span>
<span class="tabs" align="left">
<a href="/"><img src="img/home.png"/>&nbsp;Home</a>&nbsp;
<a href="http://launchpad.net/appy"><img src="img/download.gif"/>&nbsp;Download</a>
<a href="https://answers.launchpad.net/appy"><img src="img/forum.png"/>Forum</a>
<a href="https://blueprints.launchpad.net/appy"><img src="img/todo.gif"/>&nbsp;To do</a>&nbsp;
<a href="javascript:sendMail('appyframework.org', 'info')"><img src="img/contact.gif"/>&nbsp;Contact</a>&nbsp;
</span><br/>
<span class="doc"><a href="docToc.html">Documentation</a> || <a href="gen.html">gen</a> - creating <a href="genCreatingBasicClasses.html">basic</a> and <a href="genCreatingAdvancedClasses.html">advanced</a> classes - <a href="genSecurityAndWorkflows.html">security and workflows</a> || <a href="pod.html">pod</a> - creating <a href="podWritingTemplates.html">basic</a> and <a href="podWritingAdvancedTemplates.html">advanced</a> templates - <a href="podRenderingTemplates.html">rendering</a> templates</span>
</td>
</tr>
<tr>
@ -44,7 +38,7 @@
<td class="borders" valign="top">{{ content }}</td>
</tr>
<tr>
<td class="borders bottomStrip"><a href="version.html"><img src="img/download.gif"/>&nbsp;Download and install</a></td>
<td class="borders bottomStrip"><a href="http://launchpad.net/appy"><img src="img/download.gif"/>&nbsp;Download</a></td>
</tr>
<tr>
<td>

View file

@ -1,64 +1 @@
0.5.5 (2010-04-21)
- Lots of minor improvements and implementation of first elements for a Plone3 generator.
0.5.4 (2010-03-24)
- Improved gen search screens and many more minor bugfixes and features.
0.5.3 (2010-02-15)
- Improved gen/pod integration by adding a Pod field for appy.gen applications.
0.5.2 (2010-02-05)
- Performance improvements in the XML marshaller
- Added a class "appy.gen.No" allowing to explain to the end-user why he can't trigger some workflow condition.
0.5.1 (2010-02-02)
- Bugfixes (encoding problems) in Python-to-XML marshaller.
0.4.1 (2009-11-03)
- Ajax framework within appy.gen
- More improvements in XHTML->ODT conversion within appy.pod
0.4.0 (2009-08-12)
- Alpha version.
0.3.1 (2009-04-10)
- gen: added the concept of "phase" for structuring a root content type.
0.3.0 (2009-03-25)
- Includes the first version of appy.gen, a new code generator for Plone for building complex and shared web applications.
- pod: new function "document" that allows to integrate, in a pod template, the content of an external document or image.
- pod: converter.py: instead of asking to OpenOffice to convert an odt file into pdf, doc, etc, converter.py can now ask to update an odt document (refresh indexes and table of contents, resolve external links). Resolving external links is needed if you use the new "document" function (excepted for images and pdfs).
- pod: new boolean parameter to the renderer: "forceOoCall". If True, OpenOffice will be contacted in server mode even if the result is asked in odt. This way, OpenOffice will update indexes and resolve external links. Set this parameter to True when using the new "document" function.
- pod: you may now create pod templates with OpenOffice 3.x (parsing problem with notes is solved)
- pod: OO conversion: connection to OO in server mode under Windows solved ("import socket" before "import uno")
- pod: instruction "do ... for ...' accepts now all Python objects implementing the iterator protocol, like iterators from Django query sets (querySet.iterator())
0.2.1 (2008-06-04)
- XHTML to ODT conversion: possibility to use 2 different predefined pod-styles to apply to "li" elements: the default one, and a second one named "podItemKeepWithNext" that ensures that the targeted "li" element will always stay on the same page as the paragraph below him.
- Minor bugfixes.
0.2.0 (2008-03-23)
- Implementation of an "else" statement.
- "if" statements may be named in order to solve ambiguities when linking "if" and "else" statements.
- Besides "if" and "else" statements, an "if" expression is also proposed under the form of a function named "test" that is defined in the default pod context.
0.1.0 (2008-03-10)
- Because of huge international pressure, version 0.0.4 was published as 0.1.0. From now on, the pod numbering scheme will follow the rule MAJOR.MINOR.BUGFIX: development of major functions will increment MAJOR (the first figure); development of minor functions will increment MINOR (the second figure) while bug fixes will increment BUGFIX (the third figure).
- From now on, pod eggs will be published on http://pypi.python.org.
0.0.4 (2008-03-10)
- Management of XHTML tables.
- XHTML parser is now case-insensitive.
0.0.3 (2008-01-24)
- Refactoring in the SAX parsers used in pod has improved overall design and performance.
- Pod replacements now work in headers and footers.
- A "from" clause can now complete any pod statement, allowing to include arbitrary ODT content.
- The "xhtml" function MUST now be used in "from" clauses ("do text from xhtml(xhtmlChunk)") and not in pod expressions anymore (users migrating from pod 0.0.2 to 0.0.3 and using the "xhtml" function will need to modify their pod templates).
0.0.2 (2007-10-01)
- Possibility to integrate XHTML chunks into ODT documents. You can customize the way pod maps html elements or CSS styles to ODT styles.
- New automated test system.
0.0.1 (2007-05-22)
- First version of appy.pod.
0.5.5

11
install.txt Normal file
View file

@ -0,0 +1,11 @@
Installation under Windows or MacOS
-----------------------------------
Copy the content of this folder to
<where_you_installed_python>\Lib\site-packages\appy
Installation under Linux
------------------------
Copy the content of this folder wherever you want (in /opt/appy for example)
and make a symbolic link in your Python lib folder (for example:
"ln -s /opt/appy /usr/lib/python2.5/site-packages/appy").

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.