[javascriptlint-commit] SF.net SVN: javascriptlint:[264] trunk
Status: Beta
Brought to you by:
matthiasmiller
|
From: <mat...@us...> - 2009-10-06 17:02:14
|
Revision: 264
http://javascriptlint.svn.sourceforge.net/javascriptlint/?rev=264&view=rev
Author: matthiasmiller
Date: 2009-10-06 17:02:05 +0000 (Tue, 06 Oct 2009)
Log Message:
-----------
www: change template path to be specified in each file
Modified Paths:
--------------
trunk/www/contact_support.htm
trunk/www/docs/index.htm
trunk/www/docs/running_from_the_command_line.htm
trunk/www/docs/running_from_windows_explorer.htm
trunk/www/docs/running_from_your_ide.htm
trunk/www/docs/running_from_your_php_website.htm
trunk/www/docs/running_from_your_windows_program.htm
trunk/www/download.htm
trunk/www/index.htm
trunk/www/news.php
trunk/www/online_lint.php
trunk/www.py
Modified: trunk/www/contact_support.htm
===================================================================
--- trunk/www/contact_support.htm 2009-10-06 16:54:26 UTC (rev 263)
+++ trunk/www/contact_support.htm 2009-10-06 17:02:05 UTC (rev 264)
@@ -1,4 +1,5 @@
<!--
+@template=__template__
@title=Contact
-->
Modified: trunk/www/docs/index.htm
===================================================================
--- trunk/www/docs/index.htm 2009-10-06 16:54:26 UTC (rev 263)
+++ trunk/www/docs/index.htm 2009-10-06 17:02:05 UTC (rev 264)
@@ -1,4 +1,5 @@
<!--
+@template=__template__
@title=Documentation
-->
Modified: trunk/www/docs/running_from_the_command_line.htm
===================================================================
--- trunk/www/docs/running_from_the_command_line.htm 2009-10-06 16:54:26 UTC (rev 263)
+++ trunk/www/docs/running_from_the_command_line.htm 2009-10-06 17:02:05 UTC (rev 264)
@@ -1,4 +1,5 @@
<!--
+@template=__template__
@title=Running from the Command Line
-->
Modified: trunk/www/docs/running_from_windows_explorer.htm
===================================================================
--- trunk/www/docs/running_from_windows_explorer.htm 2009-10-06 16:54:26 UTC (rev 263)
+++ trunk/www/docs/running_from_windows_explorer.htm 2009-10-06 17:02:05 UTC (rev 264)
@@ -1,4 +1,5 @@
<!--
+@template=__template__
@title=Running from Windows Explorer
-->
Modified: trunk/www/docs/running_from_your_ide.htm
===================================================================
--- trunk/www/docs/running_from_your_ide.htm 2009-10-06 16:54:26 UTC (rev 263)
+++ trunk/www/docs/running_from_your_ide.htm 2009-10-06 17:02:05 UTC (rev 264)
@@ -1,4 +1,5 @@
<!--
+@template=__template__
@title=Running from your IDE
-->
Modified: trunk/www/docs/running_from_your_php_website.htm
===================================================================
--- trunk/www/docs/running_from_your_php_website.htm 2009-10-06 16:54:26 UTC (rev 263)
+++ trunk/www/docs/running_from_your_php_website.htm 2009-10-06 17:02:05 UTC (rev 264)
@@ -1,4 +1,5 @@
<!--
+@template=__template__
@title=Running from Your PHP Website
-->
Modified: trunk/www/docs/running_from_your_windows_program.htm
===================================================================
--- trunk/www/docs/running_from_your_windows_program.htm 2009-10-06 16:54:26 UTC (rev 263)
+++ trunk/www/docs/running_from_your_windows_program.htm 2009-10-06 17:02:05 UTC (rev 264)
@@ -1,4 +1,5 @@
<!--
+@template=__template__
@title=Running from Your Windows Program
-->
Modified: trunk/www/download.htm
===================================================================
--- trunk/www/download.htm 2009-10-06 16:54:26 UTC (rev 263)
+++ trunk/www/download.htm 2009-10-06 17:02:05 UTC (rev 264)
@@ -1,4 +1,5 @@
<!--
+@template=__template__
@title=Download
-->
Modified: trunk/www/index.htm
===================================================================
--- trunk/www/index.htm 2009-10-06 16:54:26 UTC (rev 263)
+++ trunk/www/index.htm 2009-10-06 17:02:05 UTC (rev 264)
@@ -1,4 +1,5 @@
<!--
+@template=__template__
@title=JavaScript Lint
-->
Modified: trunk/www/news.php
===================================================================
--- trunk/www/news.php 2009-10-06 16:54:26 UTC (rev 263)
+++ trunk/www/news.php 2009-10-06 17:02:05 UTC (rev 264)
@@ -1,4 +1,5 @@
<!--
+@template=__template__
@title=Contact
-->
Modified: trunk/www/online_lint.php
===================================================================
--- trunk/www/online_lint.php 2009-10-06 16:54:26 UTC (rev 263)
+++ trunk/www/online_lint.php 2009-10-06 17:02:05 UTC (rev 264)
@@ -1,4 +1,5 @@
<!--
+@template=__template__
@title=The Online Lint
-->
Modified: trunk/www.py
===================================================================
--- trunk/www.py 2009-10-06 16:54:26 UTC (rev 263)
+++ trunk/www.py 2009-10-06 17:02:05 UTC (rev 264)
@@ -48,13 +48,17 @@
elif path.endswith('.png'):
return 'image/png', source
elif path.endswith('.htm') or path.endswith('.php'):
- body = markdown.markdown(source)
- keywords = re.findall(r'^@(\w+)=(.*)$', source, re.MULTILINE)
- # TODO: encode
- keywords = dict(keywords)
- keywords['body'] = body
- keywords['nav'] = _get_nav(path)
- page = open(TEMPLATE_PATH).read() % keywords
+ settings = dict(re.findall(r'^@(\w+)=(.*)$', source, re.MULTILINE))
+
+ page = markdown.markdown(source)
+ if 'template' in settings:
+ # TODO: encode keywords
+ keywords = dict(settings)
+ del keywords['template']
+ keywords['body'] = page
+ keywords['nav'] = _get_nav(path)
+ template_path = os.path.join(DOC_ROOT, settings['template'])
+ page = open(template_path).read() % keywords
return 'text/html', page
else:
raise ValueError, 'Invalid file type: %s' % path
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|