Commit Graph

72 Commits

Author SHA1 Message Date
Benjamin Peterson 591a85fadc mask bdfl-delegate email 2017-06-11 12:43:16 -07:00
Benjamin Peterson 2a42be8c60 vendorize some docutils pep transformations, so we can update them 2017-06-11 12:42:47 -07:00
Donald Stufft cfa09e1878 Halt on warnings and not just errors 2016-07-05 13:14:38 -04:00
Matthias Bussonnier 4012c124e1 Handle pep files with `.rst` extensions. 2016-06-27 10:30:09 -07:00
Serhiy Storchaka 56d4eced1d cgi.escape is deprecated, use html.escape instead. 2016-05-03 10:51:13 +03:00
Zachary Ware c1bc6693ac Port pep2html.py to 2/3.
This is a fairly naive port, just ran 2to3 over it and then tweaked
enough to make both versions happy.
2015-04-12 22:27:02 -05:00
Benjamin Peterson fe2923d6eb add missing import 2014-10-07 19:26:44 -04:00
Benjamin Peterson a12e33acbb get docutils not to use the svn url 2014-10-07 16:18:39 -04:00
Benjamin Peterson f0a6df9669 give https link 2014-10-07 16:04:45 -04:00
Benjamin Peterson e0189b5a17 cleanup version header, too 2014-10-07 12:12:47 -04:00
Benjamin Peterson 5ddbe800cd cleanup date field after keyword expansion 2014-10-07 12:11:48 -04:00
Ned Deily ca2574f9d8 Issue #19110: Surpress Last-Modified link in PEP 0 html 2013-09-28 12:10:28 -07:00
Benjamin Peterson 6fb6ffac74 obscure the email address in bdfl-delegate, too 2013-06-05 12:03:27 -07:00
Georg Brandl ff344ee971 Fix mentions of svn.python.org and remove unneeded files. 2011-03-24 09:10:55 +01:00
Guido van Rossum 34ec2ad36c Fix some bugs when dealing with non-existent or non-PEP files. 2007-05-10 22:55:31 +00:00
Guido van Rossum 7cd5c629bf - Fix the link to the svn equivalent of viewcvs.
- Expand keywords in PEP 352.txt.
2005-11-01 00:17:41 +00:00
Guido van Rossum fe551846ee Disable the 'chmod' commands since these don't work since the move to dinsdale. 2005-10-14 15:22:30 +00:00
Guido van Rossum 4e02ab52f6 The root of the tree on dinsdale is /data, not /ftp. 2005-10-13 21:04:15 +00:00
Andrew M. Kuchling 97b822857f Use new www server hostname 2005-10-12 16:08:28 +00:00
David Goodger e65b9b97b5 allow https URI scheme in links, continued 2004-07-19 19:05:01 +00:00
David Goodger 84a666a86d allow https URI scheme in links 2004-07-19 19:02:14 +00:00
David Goodger 0a9b3b929c changes from Docutils project: reformatted docstring/help; send -h/--help output to stdout not stderr; enable exception tracebacks from Docutils; improved version checking 2004-04-02 19:20:13 +00:00
David Goodger e2e00085ed updated 2002-11-13 01:36:44 +00:00
David Goodger 119861ad94 Moved comment inside <head> to appease MSIE. 2002-11-12 05:36:09 +00:00
David Goodger d0acf8e599 Added --local/-l option to make my life easier on creosote. Removed bogus <body> attributes. 2002-11-12 00:56:27 +00:00
David Goodger 419185c12d Added "DO NOT EDIT" comment. Updated from Docutils. 2002-11-08 03:43:48 +00:00
David Goodger cb0de5fce0 Updated for new ``publish_string()`` convenience function. 2002-10-19 01:33:12 +00:00
David Goodger 623c977f6e updated for Docutils API changes 2002-10-18 05:19:08 +00:00
David Goodger 38805e00d4 updated to warn if the installed Docutils is not up to date 2002-09-12 02:31:38 +00:00
David Goodger bd6020c372 removed tab 2002-08-30 04:30:40 +00:00
David Goodger 1655ef5d34 Added an exception handler for a bad PEP number. Updated docstrings. 2002-08-30 03:22:58 +00:00
Barry Warsaw 0e918468e6 push_pep(): Be sure the reST pep.css file gets pushed out too. 2002-08-26 17:02:09 +00:00
Barry Warsaw f4f726904e David Goodger writes:
* Refactored the file I/O model throughout, to support multiple
  processing paths.  PEP source text is now read into a list of lines.

* In ``fixfile()``:

  - Updated its parameters for the new I/O model.
  - Changed ``fo`` to ``outfile``, ``fi`` to ``inpath`` and
    ``input_lines``.
  - Input is read in by iterating over the list of input lines, rather
    than using "readlines()".
  - Opening and closing of files is done by the caller, "make_html()".
  - Added PEP number processing in Requires header.
  - Linked "Content-Type: text/plain" to PEP 9.

* Added ``fix_rst_pep()``, which imports and calls Docutils code.

* Added ``get_pep_type()``, which checks for a Content-Type header and
  returns the value, defaulting to "text/plain".  If no PEP header is
  found, ``None`` is returned: input is not a PEP.

* Added ``get_input_lines()`` to read input file into a list.

* Expanded ``make_html()`` to catch errors and process the different
  PEP formats via the new ``PEP_TYPE_DISPATCH`` dict.

* Added ``check_requirements()`` to check both Python and Docutils
  requirements.  ``pep_type_error()`` is called if the required
  software is not available.

* In ``main()``:

  - Added an ``argv`` parameter, so that pep2html.py can be imported
    and command-line options passed in.  Yes, I use this functionality
    in the Docutils "buildhtml.py" front end.
  - Files skipped (due to an error) are not pushed onto the server.
2002-08-26 16:54:54 +00:00
Barry Warsaw b6612d3812 Oops, get rid of debugging prints. 2002-07-30 16:25:17 +00:00
Barry Warsaw 946f4253b2 Note! Python 2.2 is now required (you need the email package).
fixfile(): Modify the Author: and Discussions-To: header handling for
the new required format.  Since this uses Python 2.2's email package,
it should normalize either old style or new style addresses to the new
style for the web page.
2002-07-30 16:17:11 +00:00
Fred Drake 8400ef771c Change the handling of email addresses to be somewhat more difficult for
spam harvesters to collect, and limit those that are actually turned into
hyperlinks.
2002-05-28 15:46:24 +00:00
Fred Drake ac45574485 Link to the stylesheet instead of embedding it; even NS4 doesn't require
that!
Allow the stylesheet to take care of alignment in the headers table.
2002-04-04 16:13:32 +00:00
Fred Drake 95a78f70d3 Do not open <pre> sections until we need them; this avoids empty <pre>
elements at the top of the content and removes leading blank lines inside
<pre> sections.
2002-04-04 15:42:20 +00:00
Fred Drake 7417257094 Move the publication site for PEPs to python.org. 2002-04-02 23:07:13 +00:00
Guido van Rossum 73765a5bb7 Add -b/--browse option, which uses the webbrowser module to show the
generated HTML in your browser.  (The local HTML without -i, the
remote HTML with -i; PEP 0 when no pep argument is given.)

Fix the help text for -i (referenced sf_username which wasn't
defined).

Sort the files when processing all of them (glob doesn't sort, alas).
2002-03-15 18:14:39 +00:00
Marc-André Lemburg e7818687b7 Added support for Last-Modified header and its (possibly automatic)
generation.
2002-03-01 19:07:46 +00:00
Marc-André Lemburg b40374d85b Fix for the case when no PEP title is given. 2002-02-16 10:44:32 +00:00
Marc-André Lemburg b71153a027 Fixed a typo which caused help (-h) to fail. 2002-02-04 22:38:27 +00:00
Barry Warsaw 2e318ecd10 Slight rewording of docstring. 2001-11-12 14:58:07 +00:00
Barry Warsaw 7dd574bea5 fixpat: Add , to the list of punctuation allowable in a url.
fixanchor(): Adopt the algorithm for url recognition from faqwiz after
    suggestion by Guido.  Strip any trailing punctuation from the end
    of the url.

    Also, use .startswith() where appropriate.
2001-08-14 21:42:39 +00:00
Barry Warsaw c673087bfc fixfile(): Added special casing to handle the new PEP 0 format, which
eliminates the "filename" field in favor of just the unadorned PEP
    number.
2001-08-14 16:45:19 +00:00
Barry Warsaw d7727706d9 fixpat: Recognize current preferred usage for PEP references in body,
e.g. "PEP 1".

fixanchor(): Turn preferred usage for PEP references into PEP url
using the new PEPURL template (which uses the canonical
www.python.org/peps url instead of the sourceforge.net site).
(Also, get rid of base argument in int() calls; base 10 is default.)

fixfile(): If we can't open the input file, print an error message and
continue on.
2001-07-05 18:44:20 +00:00
Barry Warsaw bdb526ef89 fixanchor(): Use a module global RFCURL template for RFC urls. Change
this template to point at the nice faqs.org html-ified RFCs.
2001-06-05 17:21:19 +00:00
Barry Warsaw f01e1f9e49 The home directory for the python project has moved (and the symlink removed). 2001-05-01 17:53:52 +00:00
Barry Warsaw 11272e5033 fixfile(): Discussions-To: can contain an address or a url. Adjust
the text accordingly.
2001-03-21 18:59:03 +00:00