[Python-checkins] CVS: python/nondist/peps pep2html.py,1.33,1.34 style.css,1.1,1.2

Fred L. Drake fdrake@users.sourceforge.net
Tue, 02 Apr 2002 15:07:16 -0800


Update of /cvsroot/python/python/nondist/peps
In directory usw-pr-cvs1:/tmp/cvs-serv17575

Modified Files:
	pep2html.py style.css 
Log Message:
Move the publication site for PEPs to python.org.

Index: pep2html.py
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** pep2html.py	15 Mar 2002 18:14:39 -0000	1.33
--- pep2html.py	2 Apr 2002 23:07:13 -0000	1.34
***************
*** 39,42 ****
--- 39,43 ----
  import getopt
  import errno
+ import random
  import time
  
***************
*** 48,53 ****
  
  
! HOST = "shell.sourceforge.net"                    # host for update
! HDIR = "/home/groups/p/py/python/htdocs/peps"     # target host directory
  LOCALVARS = "Local Variables:"
  
--- 49,54 ----
  
  
! HOST = "www.python.org"                    # host for update
! HDIR = "/ftp/ftp.python.org/pub/www.python.org/peps" # target host directory
  LOCALVARS = "Local Variables:"
  
***************
*** 141,155 ****
      if title:
          print >> fo, '  <title>%s</title>' % cgi.escape(title)
!         print >> fo, '  <link rel="STYLESHEET" href="style.css">'
      print >> fo, '</head>'
      # body
!     print >> fo, '<body bgcolor="white">'
!     print >> fo, '<div class="navigation">'
!     print >> fo, '[<b><a href="../">home</a></b>]'
      if basename <> 'pep-0000.txt':
!         print >> fo, '[<b><a href=".">index</a></b>]'
      if pep:
!         print >> fo, '[<b><a href="pep-%04d.txt">PEP source</a></b>]' % int(pep)
!     print >> fo, '</div>'
      print >> fo, '<div class="header">\n<table border="0">'
      for k, v in header:
--- 142,167 ----
      if title:
          print >> fo, '  <title>%s</title>' % cgi.escape(title)
!     print >> fo, '  <style type="text/css">'
!     css = open(os.path.join(os.path.dirname(infile), "style.css")).read()
!     print >> fo, css.rstrip()
!     print >> fo, '  </style>'
      print >> fo, '</head>'
      # body
!     print >> fo, '<body bgcolor="white" marginwidth="0" marginheight="0">'
!     print >> fo, '<table class="navigation" cellpadding="0" cellspacing="0"'
!     print >> fo, '       width="100%" border="0">'
!     print >> fo, '<tr><td class="navicon" width="150" height="35">'
!     r = random.choice(range(64))
!     print >> fo, '<a href="../" title="Python Home Page">'
!     print >> fo, '<img src="../pics/PyBanner%03d.gif" alt="[Python]"' % r
!     print >> fo, ' border="0" width="150" height="35" /></a></td>'
!     print >> fo, '<td class="textlinks" align="left">'
!     print >> fo, '[<b><a href="../">Python Home</a></b>]'
      if basename <> 'pep-0000.txt':
!         print >> fo, '[<b><a href=".">PEP Index</a></b>]'
      if pep:
!         print >> fo, '[<b><a href="pep-%04d.txt">PEP Source</a></b>]' \
!               % int(pep)
!     print >> fo, '</td></tr></table>'
      print >> fo, '<div class="header">\n<table border="0">'
      for k, v in header:
***************
*** 181,189 ****
          else:
              v = cgi.escape(v)
!         print >> fo, '  <tr><th align="right">%s:</th><td>%s</td></tr>' % (
!             cgi.escape(k), v)
      print >> fo, '</table>'
      print >> fo, '</div>'
      print >> fo, '<hr />'
      print >> fo, '<pre>'
      while 1:
--- 193,202 ----
          else:
              v = cgi.escape(v)
!         print >> fo, '  <tr><th align="right">%s:&nbsp;</th><td>%s</td></tr>' \
!               % (cgi.escape(k), v)
      print >> fo, '</table>'
      print >> fo, '</div>'
      print >> fo, '<hr />'
+     print >> fo, '<div class="content">'
      print >> fo, '<pre>'
      while 1:
***************
*** 222,225 ****
--- 235,239 ----
              fo.write(line)
      print >> fo, '</pre>'
+     print >> fo, '</div>'
      print >> fo, '</body>'
      print >> fo, '</html>'

Index: style.css
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/style.css,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** style.css	27 Jul 2000 18:44:44 -0000	1.1
--- style.css	2 Apr 2002 23:07:13 -0000	1.2
***************
*** 1,7 ****
! .navigation { background: #99ccff;
!               border: thin solid #ffffff;
!               width: 100%;
!               padding: 4pt;
!               }
  
! .header th:after { content: "  " }
--- 1,15 ----
! .navigation { width: 100%;
!               background: #99ccff; }
  
! .navigation .navicon { width: 150px;
!                        height: 35; }
! .navigation .textlinks { padding-left: 1em;
!                          text-align: left; }
! 
! .header, .content { margin-left: 1em;
!                     margin-right: 1em;
!                     padding-left: 1em;
!                     padding-right: 1em; }
! 
! body { margin: 0px;
!        padding: 0px; }