[Spambayes-checkins] website/scripts/ht2html SpamBayesGenerator.py,1.1.1.1,1.2

Neale Pickett rubiconx@users.sourceforge.net
Thu, 19 Sep 2002 11:16:13 -0700


Update of /cvsroot/spambayes/website/scripts/ht2html
In directory usw-pr-cvs1:/tmp/cvs-serv707/scripts/ht2html

Modified Files:
	SpamBayesGenerator.py 
Log Message:
* Fixed the little picture in the corner.


Index: SpamBayesGenerator.py
===================================================================
RCS file: /cvsroot/spambayes/website/scripts/ht2html/SpamBayesGenerator.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** SpamBayesGenerator.py	19 Sep 2002 08:40:56 -0000	1.1.1.1
--- SpamBayesGenerator.py	19 Sep 2002 18:16:11 -0000	1.2
***************
*** 1,2 ****
--- 1,3 ----
+ #! /usr/bin/env python
  """Generates the www.python.org website style
  """
***************
*** 50,60 ****
          sitelink_fixer.massage(sitelinks, self.__d, aboves=1)
          Banner.__init__(self, sitelinks)
-         # calculate the random corner
-         # XXX Should really do a list of the pics directory...
-         NBANNERS = 64
-         i = whrandom.randint(0, NBANNERS-1)
-         s = "PyBanner%03d.gif" % i
-         self.__d['banner'] = s
-         self.__whichbanner = i
  
      def get_meta(self):
--- 51,54 ----
***************
*** 99,126 ****
          return '''
  <center>
!     <a href="%(rootdir)s/">
!     <img alt="" border="0"
!          src="%(rootdir)s/pics/%(banner)s"></a></center>''' % \
      self.__d 
  
      def get_corner_bgcolor(self):
!         # this may not be 100% correct.  it uses PIL to get the RGB values at
!         # the corners of the image and then takes a vote as to the most likely
!         # value.  Some images may be `bizarre'.  See .../pics/backgrounds.py
!         return [
!              '#3399ff',  '#6699cc',  '#3399ff',  '#0066cc',  '#3399ff', 
!              '#0066cc',  '#0066cc',  '#3399ff',  '#3399ff',  '#3399ff', 
!              '#3399ff',  '#6699cc',  '#3399ff',  '#3399ff',  '#ffffff', 
!              '#6699cc',  '#0066cc',  '#3399ff',  '#0066cc',  '#3399ff', 
!              '#6699cc',  '#0066cc',  '#6699cc',  '#3399ff',  '#3399ff', 
!              '#6699cc',  '#3399ff',  '#3399ff',  '#6699cc',  '#6699cc', 
!              '#0066cc',  '#6699cc',  '#0066cc',  '#6699cc',  '#0066cc', 
!              '#0066cc',  '#6699cc',  '#3399ff',  '#0066cc',  '#bbd6f1', 
!              '#0066cc',  '#6699cc',  '#3399ff',  '#3399ff',  '#0066cc', 
!              '#0066cc',  '#0066cc',  '#6699cc',  '#6699cc',  '#3399ff', 
!              '#3399ff',  '#6699cc',  '#0066cc',  '#0066cc',  '#6699cc', 
!              '#0066cc',  '#6699cc',  '#3399ff',  '#6699cc',  '#3399ff', 
!              '#d6ebff',  '#6699cc',  '#3399ff',  '#0066cc',
!              ][self.__whichbanner]
  
      def get_body(self):
--- 93,102 ----
          return '''
  <center>
!     <a href="http://www.student.virginia.edu/~improv/games/findthespam.html">
!     <img alt="" border="0" src="%(rootdir)s/pics/banner.png"></a></center>''' % \
      self.__d 
  
      def get_corner_bgcolor(self):
!         return "#ffffff"
  
      def get_body(self):