httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r729598 - /httpd/sandbox/mod_mbox-3/scripts/site-sitemap.py
Date Sat, 27 Dec 2008 05:22:37 GMT
Author: pquerna
Date: Fri Dec 26 21:22:35 2008
New Revision: 729598

URL: http://svn.apache.org/viewvc?rev=729598&view=rev
Log:
tool to generate a static sitemap list for all mailing lists.

Added:
    httpd/sandbox/mod_mbox-3/scripts/site-sitemap.py   (contents, props changed)
      - copied, changed from r729597, httpd/sandbox/mod_mbox-3/scripts/site-index.py

Copied: httpd/sandbox/mod_mbox-3/scripts/site-sitemap.py (from r729597, httpd/sandbox/mod_mbox-3/scripts/site-index.py)
URL: http://svn.apache.org/viewvc/httpd/sandbox/mod_mbox-3/scripts/site-sitemap.py?p2=httpd/sandbox/mod_mbox-3/scripts/site-sitemap.py&p1=httpd/sandbox/mod_mbox-3/scripts/site-index.py&r1=729597&r2=729598&rev=729598&view=diff
==============================================================================
--- httpd/sandbox/mod_mbox-3/scripts/site-index.py (original)
+++ httpd/sandbox/mod_mbox-3/scripts/site-sitemap.py Fri Dec 26 21:22:35 2008
@@ -4,9 +4,9 @@
 import sys
 
 ROOT="/x1/mail-archives/mod_mbox"
-
+ROOT="/opt/mail"
+HOSTNAME="http://mail-archives.apache.org/mod_mbox/"
 tlps={}
-count = 0
 for files in os.listdir(ROOT):
     path = files
     tlp = path[0:path.find('-')]
@@ -19,72 +19,28 @@
     if not tlps.has_key(tlp):
         tlps[tlp] = {}
     tlps[tlp][list] = path
-    count = count + 1
 
 keys = tlps.keys()
 keys.sort()
 
-print """<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-  <title>Available Mailing Lists</title>
-</head>
-<!-- Background white, links blue (unvisited), navy (visited), red
-(active) -->
- <body
-  bgcolor="#FFFFFF" text="#000000" link="#0000FF"
-  vlink="#000080" alink="#FF0000">
-<script type="text/javascript">
-<!--
-function TLP_onchange() {
-document.location.hash = document.forms[0].TLP[document.forms[0].TLP.selectedIndex].value
-}
--->
-</script>
-<h2>Welcome to the mail archives on mail-archives.apache.org.</h2>
-<form action="" method="get" id="tlpform">
-<table width="100%">
-<tr align="left">
-<i>Jump to a specific top-level archive section: </i>
-<select size="1" name="TLP" onchange="return TLP_onchange()">
-"""
-
-for tlp in keys:
-    print "<option value=\"%s\">%s</option>" % (tlp, tlp)
-
 print """
-</select>
-</form>
-<table width="100%">
-<tr valign="top"><td>
-<ul>
+<?xml version="1.0" encoding="UTF-8"?>
+<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
 """
-i = 0
-colcount = 0
+# TODO: Insert a 'static' file sitemap.
+"""
+   <sitemap>
+      <loc>/sitemap-static.xml</loc>
+   </sitemap>
+"""
+
 for tlp in keys:
-    if tlp == "asf":
-        print "<li><h3><a name='asf-wide'>ASF-wide lists:</a></h3>"
-    else:
-        print "<li><h3><a name='%s'>%s.apache.org lists:</a></h3>"
% (tlp, tlp)
-    print "<ul>"
     klist = tlps[tlp].keys()
     klist.sort()
     for list in klist:
-        print "    <li><a href='%s/'>%s</a></li>" % (tlps[tlp][list],
list)
-        i = i + 1
-        colcount = colcount + 1
-    print "</ul></li>"
-    if colcount >= count/3:
-        print """</ul></td><td><ul>"""
-        colcount = 0
+        print "   <sitemap><loc>%s%s/?format=sitemap</loc></sitemap>"
% (HOSTNAME, tlps[tlp][list])
 
 print """
-</ul>
-</td>
-</tr>
-</table>
-</body>
-</html>
+</sitemapindex>
 """
+

Propchange: httpd/sandbox/mod_mbox-3/scripts/site-sitemap.py
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpd/sandbox/mod_mbox-3/scripts/site-sitemap.py
------------------------------------------------------------------------------
    svn:executable = *

Propchange: httpd/sandbox/mod_mbox-3/scripts/site-sitemap.py
------------------------------------------------------------------------------
    svn:mergeinfo = 



Mime
View raw message