From 1f72554078016fe2408fe97661f4dcf917067e51 Mon Sep 17 00:00:00 2001 From: David Goodger Date: Thu, 23 Mar 2006 14:28:55 +0000 Subject: [PATCH] fixed references to PEP template; restored warning comment to HTML output --- pep-0009.txt | 5 +++-- pep-0012.txt | 5 +++-- pep2pyramid.py | 5 ++--- pyramid-pep-template | 5 +++++ 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/pep-0009.txt b/pep-0009.txt index f1ff6c41b..e3b22f172 100644 --- a/pep-0009.txt +++ b/pep-0009.txt @@ -21,8 +21,9 @@ Abstract grab the plaintext source of this PEP in order to complete the steps below. DO NOT USE THE HTML FILE AS YOUR TEMPLATE! - To get the source this (or any) PEP, look at the top of the html - page and click on the link titled "PEP Source". + To get the source this (or any) PEP, look at the top of the HTML + page and click on the date & time on the "Last-Modified" line. It + is a link to the source text in the Python repository. If you would prefer to use lightweight markup in your PEP, please see PEP 12, "Sample reStructuredText PEP Template" [2]. diff --git a/pep-0012.txt b/pep-0012.txt index 6150e7188..2bcf9bf82 100644 --- a/pep-0012.txt +++ b/pep-0012.txt @@ -23,8 +23,9 @@ Note: if you are reading this PEP via the web, you should first grab the text (reStructuredText) source of this PEP in order to complete the steps below. **DO NOT USE THE HTML FILE AS YOUR TEMPLATE!** -To get the source of this (or any) PEP, look at the top of the HTML -page and click on the link titled "PEP Source". +To get the source this (or any) PEP, look at the top of the HTML page +and click on the date & time on the "Last-Modified" line. It is a +link to the source text in the Python repository. If you would prefer not to use markup in your PEP, please see PEP 9, "Sample Plaintext PEP Template" [2]_. diff --git a/pep2pyramid.py b/pep2pyramid.py index 157db9040..920ded1aa 100755 --- a/pep2pyramid.py +++ b/pep2pyramid.py @@ -45,14 +45,12 @@ LOCALVARS = "Local Variables:" COMMENT = """""" # The generated HTML doesn't validate -- you cannot use
and

inside #
 tags.  But if I change that, the result doesn't look very nice...
-DTD = ('')
 
 fixpat = re.compile("((https?|ftp):[-_a-zA-Z0-9/.+~:?#$=&,]+)|(pep-\d+(.txt)?)|"
                     "(RFC[- ]?(?P\d+))|"
@@ -179,6 +177,7 @@ def fixfile(inpath, input_lines, outfile):
     if pep:
         title = "PEP " + pep + " -- " + title
     r = random.choice(range(64))
+    print >> outfile, COMMENT
     print >> outfile, '
\n' for k, v in header: if k.lower() in ('author', 'discussions-to'): diff --git a/pyramid-pep-template b/pyramid-pep-template index 92aee1b52..f65a5ab5e 100644 --- a/pyramid-pep-template +++ b/pyramid-pep-template @@ -1 +1,6 @@ + %(body)s