From 8daef3791ea95c2e257c49d56169a49d8f4b0b3a Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 31 Mar 2000 00:55:54 +0000 Subject: New version 1.0.4. I'm sure someone mailed me these patches but I can't remember who. :-) Changes: - Owner name+email made generic instead of GvR - Support for Windows NT (running from a .bat file) - DOcument ... tags --- Tools/faqwiz/faqconf.py | 47 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/Tools/faqwiz/faqconf.py b/Tools/faqwiz/faqconf.py index fe3ca4b..9b5b8af 100644 --- a/Tools/faqwiz/faqconf.py +++ b/Tools/faqwiz/faqconf.py @@ -17,8 +17,8 @@ SECTION_TITLES = { SHORTNAME = "Generic" # FAQ name with "FAQ" omitted PASSWORD = "" # Password for editing -OWNERNAME = "GvR" # Name for feedback -OWNEREMAIL = "guido@python.org" # Email for feedback +OWNERNAME = "FAQ owner" # Name for feedback +OWNEREMAIL = "nobody@anywhere.org" # Email for feedback HOMEURL = "http://www.python.org" # Related home page HOMENAME = "Python home" # Name of related home page RCSBINDIR = "/usr/local/bin/" # Directory containing RCS commands @@ -49,13 +49,19 @@ entries marked with * were changed within the last 7 days.) # Version -- don't change unless you edit faqwiz.py -WIZVERSION = "1.0.3" # FAQ Wizard version +WIZVERSION = "1.0.4" # FAQ Wizard version -# This parameter is normally overwritten with a dynamic value - -FAQCGI = 'faqw.py' # Relative URL of the FAQ cgi script import os, sys -FAQCGI = os.path.basename(sys.argv[0]) or FAQCGI +if os.name in ['nt',]: + # On NT we'll probably be running python from a batch file, + # so sys.argv[0] is not helpful + FAQCGI = 'faq.bat' # Relative URL of the FAQ cgi script + # LOGNAME is not typically set on NT + os.environ[ 'LOGNAME' ] = "FAQWizard" +else: + # This parameter is normally overwritten with a dynamic value + FAQCGI = 'faqw.py' # Relative URL of the FAQ cgi script + FAQCGI = os.path.basename(sys.argv[0]) or FAQCGI del os, sys # Perl (re module) style regular expression to recognize FAQ entry @@ -91,12 +97,23 @@ FAQNAME = SHORTNAME + " FAQ" # Name of the FAQ # RCS commands -SH_RLOG = RCSBINDIR + "rlog %(file)s &1" -SH_RLOG_H = RCSBINDIR + "rlog -h %(file)s &1" -SH_RDIFF = RCSBINDIR + "rcsdiff -r%(prev)s -r%(rev)s %(file)s &1" -SH_REVISION = RCSBINDIR + "co -p%(rev)s %(file)s &1" -SH_LOCK = RCSBINDIR + "rcs -l %(file)s &1" -SH_CHECKIN = RCSBINDIR + "ci -u %(file)s <%(tfn)s 2>&1" +import os +if os.name in ['nt', ]: + SH_RLOG = RCSBINDIR + "rlog %(file)s < NUL" + SH_RLOG_H = RCSBINDIR + "rlog -h %(file)s < NUL" + SH_RDIFF = RCSBINDIR + "rcsdiff -r%(prev)s -r%(rev)s %(file)s < NUL" + SH_REVISION = RCSBINDIR + "co -p%(rev)s %(file)s < NUL" + ### Have to use co -l, or the file is not marked rw on NT + SH_LOCK = RCSBINDIR + "co -l %(file)s < NUL" + SH_CHECKIN = RCSBINDIR + "ci -u %(file)s < %(tfn)s" +else: + SH_RLOG = RCSBINDIR + "rlog %(file)s &1" + SH_RLOG_H = RCSBINDIR + "rlog -h %(file)s &1" + SH_RDIFF = RCSBINDIR + "rcsdiff -r%(prev)s -r%(rev)s %(file)s &1" + SH_REVISION = RCSBINDIR + "co -p%(rev)s %(file)s &1" + SH_LOCK = RCSBINDIR + "rcs -l %(file)s &1" + SH_CHECKIN = RCSBINDIR + "ci -u %(file)s <%(tfn)s 2>&1" +del os # Titles for various output pages (not subject to substitution) @@ -531,7 +548,9 @@ HREF="http://www.python.org/psa/">the PSA home page.

Can I use HTML in the FAQ entry?

-No, but if you include a URL or an email address in the text it will +Yes, if you include it in <HTML&rt; and </HTML> tags. +

+Also, if you include a URL or an email address in the text it will automatigally become an anchor of the right type. Also, *word* is made italic (but only for single alphabetic words). -- cgit v0.12