Update of /cvsroot/audacity/audacity-src/scripts/mw2html_audacity
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv32164
Modified Files:
footer.html mw2html.py
Log Message:
Changing footer link
Index: footer.html
===================================================================
RCS file: /cvsroot/audacity/audacity-src/scripts/mw2html_audacity/footer.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- footer.html 24 May 2009 21:35:34 -0000 1.1
+++ footer.html 8 Jun 2009 22:10:09 -0000 1.2
@@ -1 +1 @@
-<div align="center"><ul id="f_list"><li>Static dump from <a
href="http://audacityteam.org/manual/">Audacity's Manual</a> created on
%DATE%.</li></ul></div>
+<div align="center"><ul id="f_list"><li>Dump created on %DATE% - <a
href="%ONLINEURL%">Check current version of this page</a>.</li></ul></div>
Index: mw2html.py
===================================================================
RCS file: /cvsroot/audacity/audacity-src/scripts/mw2html_audacity/mw2html.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- mw2html.py 7 Jun 2009 00:04:35 -0000 1.7
+++ mw2html.py 8 Jun 2009 22:10:09 -0000 1.8
@@ -108,10 +108,12 @@
return L[1]
-def normalize_url(url):
+def normalize_url(url, lower=True):
# url normalization - only for local comparison operations, use original url
for online requests
url = split_section(url)[0]
- url = url.lower()
+
+ if lower:
+ url = url.lower()
if url.startswith('http://'):
url = url[len('http://'):]
@@ -268,8 +270,9 @@
return doc
-def pos_html_transform(doc):
+def pos_html_transform(doc, url):
global footer_text, config
+ url = normalize_url(url, False)
# Remove empty links
doc = clean_tag(doc, 'href=""', '</a>', '<a ');
@@ -298,6 +301,9 @@
# add static dump time
footer_html = footer_text.replace('%DATE%', strftime("%Y-%m-%d %H:%M:%S"))
+
+ # add online url
+ footer_html = footer_html.replace('%ONLINEURL%', url)
if config.special_mode:
# keep MediaWiki credits
@@ -826,7 +832,7 @@
newdoc = newdoc.replace(BEGIN_COMMENT_REPLACE, '<!--')
newdoc = newdoc.replace(END_COMMENT_REPLACE, '-->')
- newdoc = pos_html_transform(newdoc)
+ newdoc = pos_html_transform(newdoc, url)
return (newdoc, new_urls)
@@ -898,9 +904,9 @@
new_urls = []
if filename.endswith('.html'):
- (doc, new_urls) = parse_html(doc, nurl)
+ (doc, new_urls) = parse_html(doc, url)
elif filename.endswith('.css'):
- (doc, new_urls) = parse_css(doc, nurl)
+ (doc, new_urls) = parse_css(doc, url)
# Enqueue URLs that we haven't yet spidered.
for u in new_urls:
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs