Commit Graph

58 Commits

Author SHA1 Message Date
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
Barry Warsaw 3e471ac10a fixfile(): Do the mailto: hacking on both the Author: and
Discussions-To: headers.  Also, apply SF patch #410223 by Andrew
Kuchling, which does the PEP# href wrapping for Replaces: and
Replaced-By: headers.
2001-03-21 17:26:05 +00:00
Fred Drake c3157b3336 Be more careful about generating the URL to RFCs. 2001-03-21 14:52:13 +00:00
Moshe Zadka 456c12266f Add hyperlinking of RFC mentions (Idea and link stolen from pydoc.py) 2001-03-21 12:37:22 +00:00
Barry Warsaw 9fff8bede1 push_html() -> push_pep()
push_pep(), main(): Arrange for the .txt source file to also be scp
uploaded to SF when the -i/--install flag is given.
2001-03-20 15:07:21 +00:00
Barry Warsaw af1139129f fixfile(): Include a link to the plain text "PEP source" on each html
page.
2001-03-20 15:00:13 +00:00
Barry Warsaw 1c49b642d1 Document -q/--quiet in the module docstring. 2000-11-03 15:43:28 +00:00
Thomas Wouters 00cf9fa6f6 Add -u and --user options to the call to getopt, to make them actually work. 2000-11-01 23:45:47 +00:00
Fred Drake 181d3e68ea push_html(): New function; handles the mechanics of actually pushing the
generated HTML to SourceForge.

main():  Adjust to use push_html(), and simplify the logic so it only
         gets called from one place.
2000-09-08 15:31:36 +00:00
Fred Drake f07c9e76b0 Added a -q/--quiet option to suppress the per-file progress message.
Fixed the branch for files specified from the command line to only update
the Web server if the -u/--update option was used.
2000-09-07 01:26:46 +00:00
Jeremy Hylton 020ce8ad4b new usage to support conversion of only specified PEPs
Usage: %(PROGRAM)s [options] [peps]
Notes:
    The optional argument peps can be either pep numbers or .txt files.
Options:
    -u/--user
        SF username
    [rest is the same]
2000-08-28 16:00:49 +00:00
Barry Warsaw a9248810dc Linkify the Author: fields with mailto urls. 2000-08-17 04:27:04 +00:00
Peter Schneider-Kamp d5840d43dd remove superfluous special casing for lines beginning with '[*]' 2000-08-15 10:35:17 +00:00
Barry Warsaw 436c8543f6 Changed the sense of the default behavior. No longer installs the
.html files in SF by default; you must explicitly include the
-i/--install option in order to upload.

Also, added -h/--help and migrated to getopt for switch parsing.
Included a usage() function.

Some cosmetic changes.
2000-08-15 05:53:19 +00:00
Peter Schneider-Kamp 5feb78f32b special case lines beginning with "[*]" as non-header
add optical sugar
2000-08-11 22:18:04 +00:00