logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

CVS: tmda-cgi Info.py,1.1,1.2 THANKS,1.7,1.8 TODO,1.4,1.5 defaults.ini,1.8,: msg#00333

Subject: CVS: tmda-cgi Info.py,1.1,1.2 THANKS,1.7,1.8 TODO,1.4,1.5 defaults.ini,1.8,1.9 tmda-cgi.py,1.22,1.23
Update of /cvsroot/tmda/tmda-cgi
In directory sc8-pr-cvs1:/tmp/cvs-serv3520

Modified Files:
        Info.py THANKS TODO defaults.ini tmda-cgi.py 
Log Message:
Tweaked the contents of the info page somewhat.

Fixed some type-o's.

Remove Install/Uninstall from the TODO list.


Index: Info.py
===================================================================
RCS file: /cvsroot/tmda/tmda-cgi/Info.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Info.py     21 Apr 2003 00:20:26 -0000      1.1
+++ Info.py     28 Apr 2003 03:13:04 -0000      1.2
@@ -21,6 +21,7 @@
 
 "Info for tmda-cgi."
 
+import os
 import re
 import Template
 from Version import All
@@ -33,17 +34,40 @@
 ItemSearch    = re.compile("^\s+\*\s+(.+)\s+--\s+(.+)")
 ContdSearch   = re.compile("^\s+(\s.+)")
 
-def AddFile(Filename, T, AckRow, ContRow, ToDoRow):
+def Add(Name, Detail):
+  "Add an entry."
+
+  global T, BugCell, BugRow, BugCol, BugCols, Section
+
+  if Name:
+    T["Name"] = Name
+    T["Detail"] = Detail
+    if Detail == "bug finding":
+      BugCell.Add()
+      BugCol += 1
+      if BugCol == BugCols:
+        BugRow.Add()
+        BugCell.Clear()
+        BugCol = 0
+      Name = None
+    else:
+      Section.Add()
+
+def AddFile(Filename):
   "Add a file to template."
 
+  global T, AckRow, ContRow, ToDoRow, BugCell, BugRow, BugCol, BugCols, Section
+
   # Read file
   F = open(Filename)
   Thanks = F.readlines()
   F.close()
-  
+
   Section = None
   Name    = None
   Detail  = None
+  BugCol  = 0
+
   for Line in Thanks:
     AckMatch     = AckSearch.search(Line)
     ContribMatch = ContribSearch.search(Line)
@@ -51,43 +75,33 @@
     ItemMatch    = ItemSearch.search(Line)
     ContdMatch   = ContdSearch.search(Line)
     if AckMatch:
-      if Name:
-        T["Name"] = Name
-        T["Detail"] = Detail
-        Section.Add()
+      Add(Name, Detail)
       Section = AckRow
       Name = None
     elif ContribMatch:
-      if Name:
-        T["Name"] = Name
-        T["Detail"] = Detail
-        Section.Add()
+      Add(Name, Detail)
       Section = ContRow
       Name = None
     elif ToDoMatch:
-      if Name:
-        T["Name"] = Name
-        T["Detail"] = Detail
-        Section.Add()
+      Add(Name, Detail)
       Section = ToDoRow
       Name = None
     elif ItemMatch:
-      if Name:
-        T["Name"] = Name
-        T["Detail"] = Detail
-        Section.Add()
+      Add(Name, Detail)
       Name = ItemMatch.group(1)
       Detail = ItemMatch.group(2)
     elif ContdMatch:
       Detail += ContdMatch.group(1)
   if Name:
-    T["Name"] = Name
-    T["Detail"] = Detail
-    Section.Add()
+    Add(Name, Detail)
+  if BugCol:
+    BugRow.Add()
 
 def Show():
   "Show info."
 
+  global T, AckRow, ContRow, ToDoRow, BugCell, BugRow, BugCols
+
   # Load the display template
   T = Template.Template("info.html")
 
@@ -96,13 +110,29 @@
   T["TmdaVersion"] = Version.ALL
 
   # Get rows
-  AckRow  = T["AckRow"]
-  ContRow = T["ContRow"]
-  ToDoRow = T["ToDoRow"]
-  
+  ParamRow = T["Params"]
+  AckRow   = T["AckRow"]
+  ContRow  = T["ContRow"]
+  ToDoRow  = T["ToDoRow"]
+  BugCell  = T["BugCell"]
+  BugRow   = T["BugRow"]
+  BugCols  = int(T["BugCols"])
+
+  # Add compile parameters
+  Keys = os.environ.keys()
+  Keys.sort()
+  for Param in Keys:
+    if Param[:5] == "TMDA_":
+      T["Name"]   = Param[5:]
+      T["Detail"] = os.environ[Param]
+      ParamRow.Add()
+
   # Add Acknowledgements, Contributions, & ToDo's
-  AddFile("THANKS", T, AckRow, ContRow, ToDoRow)
-  AddFile("TODO", T, AckRow, ContRow, ToDoRow)
+  AddFile("THANKS")
+  AddFile("TODO")
+
+  # Special instructions
+  T["Instruct"] = PVars[("NoOverride", "InstallInstruct")]
 
   # Display template
   print T

Index: THANKS
===================================================================
RCS file: /cvsroot/tmda/tmda-cgi/THANKS,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- THANKS      25 Apr 2003 16:38:20 -0000      1.7
+++ THANKS      28 Apr 2003 03:13:04 -0000      1.8
@@ -3,7 +3,7 @@
 
     * Jason R. Mastaler -- the creator of TMDA
 
-    * Guido van Rossum -- the creator Python
+    * Guido van Rossum -- the creator of Python
 
 Contributions:
 --------------

Index: TODO
===================================================================
RCS file: /cvsroot/tmda/tmda-cgi/TODO,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- TODO        22 Apr 2003 03:46:10 -0000      1.4
+++ TODO        28 Apr 2003 03:13:04 -0000      1.5
@@ -15,9 +15,6 @@
 
     * Hide Nasty -- need a way to hide the nasty HTML in viewed e-mails
 
-    * Install / Uninstall -- options to allow users to add or remove TMDA
-                             filtering from their e-mail account
-
     * Language Support -- code to recognize the language an e-mail is in and
                           include the appropriate language identifiers in the
                           viewer

Index: defaults.ini
===================================================================
RCS file: /cvsroot/tmda/tmda-cgi/defaults.ini,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- defaults.ini        28 Apr 2003 02:09:28 -0000      1.8
+++ defaults.ini        28 Apr 2003 03:13:04 -0000      1.9
@@ -17,16 +17,16 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 [NoOverride]
 InstallBackupTGZ   = TMDA_backup.tgz
-InstallInstruct    = You will need to change the outgoing mail settings on SMTP
-  your e-mail client to make full use of TMDA's features. Please change your
-  port from 25 to 8025. Contact the helpdesk if you need some assistance in
+InstallInstruct    = You will need to change the outgoing mail settings on your
+  e-mail client to make full use of TMDA's features. Please set your SMTP port
+  to 8025 (instead of 25). Contact the helpdesk if you need some assistance in
   doing this.
 MayEditFilters     = Yes
 MayEditLocalConfig = Yes
 MayInstall         = Yes
 UninstallBackupTGZ = TMDA_restore.tgz
 UninstallInstruct  = You will need to change the outgoing mail settings on your
-  e-mail client. Please change your SMTP port from 8025 to 25. Contact the
+  e-mail client. Please set your SMTP port to 25 (instead of 8025). Contact the
   helpdesk if you need some assistance in doing this.
 UserSplit          = ^(.+)[%@](.+)$
 VPop               = /home/vpopmail

Index: tmda-cgi.py
===================================================================
RCS file: /cvsroot/tmda/tmda-cgi/tmda-cgi.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- tmda-cgi.py 28 Apr 2003 02:09:28 -0000      1.22
+++ tmda-cgi.py 28 Apr 2003 03:13:04 -0000      1.23
@@ -129,6 +129,7 @@
   EditList.Form     = Form
   GenAddr.PVars     = PVars
   GenAddr.Form      = Form
+  Info.PVars        = PVars
   Install.PVars     = PVars
   Install.Form      = Form
   LocalConfig.PVars = PVars

_______________________________________
tmda-cvs mailing list
http://tmda.net/lists/listinfo/tmda-cvs



<Prev in Thread] Current Thread [Next in Thread>