[javascriptlint-commit] SF.net SVN: javascriptlint:[273] trunk
Status: Beta
Brought to you by:
matthiasmiller
|
From: <mat...@us...> - 2009-10-08 09:08:12
|
Revision: 273
http://javascriptlint.svn.sourceforge.net/javascriptlint/?rev=273&view=rev
Author: matthiasmiller
Date: 2009-10-08 09:08:05 +0000 (Thu, 08 Oct 2009)
Log Message:
-----------
www: work on cleaning up RSS
Modified Paths:
--------------
trunk/www/news/004
trunk/www/static/global.css
trunk/www.py
Modified: trunk/www/news/004
===================================================================
--- trunk/www/news/004 2009-10-08 08:25:11 UTC (rev 272)
+++ trunk/www/news/004 2009-10-08 09:08:05 UTC (rev 273)
@@ -4,7 +4,7 @@
-->
## [JavaScript Lint 0.1e Released](__BASENAME__)
-_Tue, 31 Aug 2005 02:40:49 +0000_
+_Wed, 31 Aug 2005 02:40:49 +0000_
This release fixes a crash triggered by the following statement: _for(i = 0; i < 5; )_. (The Linux binary is not currently available for this release.)
Modified: trunk/www/static/global.css
===================================================================
--- trunk/www/static/global.css 2009-10-08 08:25:11 UTC (rev 272)
+++ trunk/www/static/global.css 2009-10-08 09:08:05 UTC (rev 273)
@@ -34,6 +34,7 @@
margin: 0.25em;
padding: 0.25em;
text-align: center;
+ width: 9em;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
@@ -58,7 +59,7 @@
#body
{
- margin-left: 9em;
+ margin-left: 11em;
}
#footer
Modified: trunk/www.py
===================================================================
--- trunk/www.py 2009-10-08 08:25:11 UTC (rev 272)
+++ trunk/www.py 2009-10-08 09:08:05 UTC (rev 273)
@@ -1,6 +1,7 @@
#!/usr/bin/python
# vim: ts=4 sw=4 expandtab
import BaseHTTPServer
+import datetime
import md5
import re
import os
@@ -92,7 +93,7 @@
raise ValueError, 'Missing @desc= setting.'
channel.appendChild(doc.createElement('title', textNode=title))
channel.appendChild(doc.createElement('link', textNode=link))
- channel.appendChild(doc.createElement('desc', textNode=desc))
+ channel.appendChild(doc.createElement('description', textNode=desc))
guids = []
@@ -152,9 +153,16 @@
if not emchild or emchild.type != 'text':
raise ValueError, "The first paragraph's em must " + \
"contain only text."
+ pubdate = emchild.value
- # TODO: Validate canonical date format.
+ format = "%a, %d %b %Y %H:%M:%S +0000"
+ dateobj = datetime.datetime.strptime(pubdate, format)
+ normalized = dateobj.strftime(format)
+ if normalized != pubdate:
+ raise ValueError, 'Encountered date %s but expected %s' % \
+ (pubdate, normalized)
+
item.appendChild(doc.createElement('pubDate', emchild.value))
item_desc = doc.createElement("description")
item.appendChild(item_desc)
@@ -245,12 +253,17 @@
self.wfile.write(content)
-def runserver():
- server_address = ('', 8000)
- httpd = BaseHTTPServer.HTTPServer(server_address, _Handler)
+def runserver(host):
+ if host:
+ addr, _, port = host.partition(':')
+ else:
+ addr = ''
+ port = 8000
+
+ httpd = BaseHTTPServer.HTTPServer((addr, port), _Handler)
httpd.serve_forever()
-def build():
+def build(host):
def findfiles(searchroot):
""" Returns relative paths in root.
"""
@@ -263,6 +276,9 @@
relpath = abspath[len(searchroot + os.sep):]
yield relpath
+ if host:
+ raise ValueError, 'Host is not yet implemented.'
+
for relpath in findfiles(DOC_ROOT):
sourcepath = os.path.join(DOC_ROOT, relpath)
destpath = os.path.join(BUILD_DIR, relpath)
@@ -276,15 +292,15 @@
finally:
outfile.close()
-def main(action=''):
+def main(action='', host=''):
if action == 'server':
- runserver()
+ runserver(host)
return
if action == 'build':
build()
return
print >>sys.stderr, """\
-Usage: www.py [server|build]
+Usage: www.py [server|build] <host>
server runs a test server on localhost
build generates static HTML files from the markup
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|