[Python-checkins] CVS: python/nondist/peps pep2html.py,1.31,1.32 pep-0263.txt,1.8,1.9
M.-A. Lemburg
lemburg@users.sourceforge.net
Fri, 01 Mar 2002 11:07:49 -0800
Update of /cvsroot/python/python/nondist/peps
In directory usw-pr-cvs1:/tmp/cvs-serv2473
Modified Files:
pep2html.py pep-0263.txt
Log Message:
Added support for Last-Modified header and its (possibly automatic)
generation.
Index: pep2html.py
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** pep2html.py 16 Feb 2002 10:44:32 -0000 1.31
--- pep2html.py 1 Mar 2002 19:07:46 -0000 1.32
***************
*** 32,40 ****
import getopt
import errno
PROGRAM = sys.argv[0]
RFCURL = 'http://www.faqs.org/rfcs/rfc%d.html'
PEPURL = 'pep-%04d.html'
!
--- 32,41 ----
import getopt
import errno
+ import time
PROGRAM = sys.argv[0]
RFCURL = 'http://www.faqs.org/rfcs/rfc%d.html'
PEPURL = 'pep-%04d.html'
! PEPCVSURL = 'http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/python/python/nondist/peps/pep-%04d.txt'
***************
*** 159,167 ****
v = SPACE.join(mailtos)
elif k.lower() in ('replaces', 'replaced-by'):
! peps = ''
! for pep in v.split():
! pep = int(pep)
! peps += '<a href="pep-%04d.html">%i</a> ' % (pep, pep)
! v = peps
else:
v = cgi.escape(v)
--- 160,174 ----
v = SPACE.join(mailtos)
elif k.lower() in ('replaces', 'replaced-by'):
! otherpeps = ''
! for otherpep in v.split():
! otherpep = int(otherpep)
! otherpeps += '<a href="pep-%04d.html">%i</a> ' % (otherpep,
! otherpep)
! v = otherpeps
! elif k.lower() in ('last-modified',):
! url = PEPCVSURL % int(pep)
! date = v or time.strftime('%d-%b-%Y',
! time.localtime(os.stat(infile)[8]))
! v = '<a href="%s">%s</a> ' % (url, cgi.escape(date))
else:
v = cgi.escape(v)
Index: pep-0263.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0263.txt,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** pep-0263.txt 28 Feb 2002 09:08:39 -0000 1.8
--- pep-0263.txt 1 Mar 2002 19:07:46 -0000 1.9
***************
*** 7,10 ****
--- 7,11 ----
Python-Version: 2.3
Created: 06-Jun-2001
+ Last-Modified:
Post-History: