"""FAQ Wizard customization module. Edit this file to customize the FAQ Wizard. For normal purposes, you should only have to change the FAQ section titles and the small group of parameters below it. """ # Titles of FAQ sections SECTION_TITLES = { # SectionNumber : SectionTitle; need at least one entry 1: "General information and availability", } # Parameters you definitely want to change SHORTNAME = "Generic" # FAQ name with "FAQ" omitted PASSWORD = "" # Password for editing OWNERNAME = "GvR" # Name for feedback OWNEREMAIL = "guido@python.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 # (must end in a slash) # Parameters you can normally leave alone MAXHITS = 10 # Max #hits to be shown directly COOKIE_LIFETIME = 28*24*3600 # Cookie expiration in seconds # (28*24*3600 = 28 days = 4 weeks) PROCESS_PREFORMAT = 1 # toggle whether preformatted text # will replace urls and emails with # HTML links # Markers appended to title to indicate recently change # (may contain HTML, e.g. ); and corresponding MARK_VERY_RECENT = " **" # Changed very recently MARK_RECENT = " *" # Changed recently DT_VERY_RECENT = 24*3600 # 24 hours DT_RECENT = 7*24*3600 # 7 days EXPLAIN_MARKS = """

(Entries marked with ** were changed within the last 24 hours; 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 # 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 del os, sys # Perl (re module) style regular expression to recognize FAQ entry # files: group(1) should be the section number, group(2) should be the # question number. Both should be fixed width so simple-minded # sorting yields the right order. OKFILENAME = r"^faq(\d\d)\.(\d\d\d)\.htp$" # Format to construct a FAQ entry file name NEWFILENAME = "faq%02d.%03d.htp" # Load local customizations on top of the previous parameters try: from faqcust import * except ImportError: pass # Calculated parameter names COOKIE_NAME = SHORTNAME + "-FAQ-Wizard" # Name used for Netscape cookie FAQNAME = SHORTNAME + " FAQ" # Name of the FAQ # ---------------------------------------------------------------------- # Anything below this point normally needn't be changed; you would # change this if you were to create e.g. a French translation or if # you just aren't happy with the text generated by the FAQ Wizard. # Most strings here are subject to substitution (string%dictionary) # 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" # Titles for various output pages (not subject to substitution) T_HOME = FAQNAME + " Wizard " + WIZVERSION T_ERROR = "Sorry, an error occurred" T_ROULETTE = FAQNAME + " Roulette" T_ALL = "The Whole " + FAQNAME T_INDEX = FAQNAME + " Index" T_SEARCH = FAQNAME + " Search Results" T_RECENT = "What's New in the " + FAQNAME T_SHOW = FAQNAME + " Entry" T_LOG = "RCS log for %s entry" % FAQNAME T_REVISION = "RCS revision for %s entry" % FAQNAME T_DIFF = "RCS diff for %s entry" % FAQNAME T_ADD = "Add an entry to the " + FAQNAME T_DELETE = "Deleting an entry from the " + FAQNAME T_EDIT = FAQNAME + " Edit Wizard" T_REVIEW = T_EDIT + " - Review Changes" T_COMMITTED = T_EDIT + " - Changes Committed" T_COMMITFAILED = T_EDIT + " - Commit Failed" T_CANTCOMMIT = T_EDIT + " - Commit Rejected" T_HELP = T_EDIT + " - Help" # Generic prologue and epilogue PROLOGUE = ''' %(title)s

%(title)s

''' EPILOGUE = '''
%(HOMENAME)s / %(FAQNAME)s Wizard %(WIZVERSION)s / Feedback to %(OWNERNAME)s ''' # Home page HOME = """

Search the %(FAQNAME)s:


Simple string / Regular expression /
Keywords (any) / Keywords (all)
Fold case / Case sensitive

Other forms of %(FAQNAME)s access:

""" # Index formatting INDEX_SECTION = """


%(sec)s. %(title)s

""" INDEX_ENTRY = """\
  • %(title)s """ LOCAL_ENTRY = """\
  • %(title)s """ # Entry formatting ENTRY_HEADER1 = """

    %(title)s\ """ ENTRY_HEADER2 = """\

    """ ENTRY_FOOTER = """ Edit this entry / Log info """ ENTRY_LOGINFO = """ / Last changed on %(last_changed_date)s by %(last_changed_author)s """ # Search NO_HITS = """ No hits. """ ONE_HIT = """ Your search matched the following entry: """ FEW_HITS = """ Your search matched the following %(count)s entries: """ MANY_HITS = """ Your search matched more than %(MAXHITS)s entries. The %(count)s matching entries are presented here ordered by section: """ # RCS log and diff LOG = """ Click on a revision line to see the diff between that revision and the previous one. """ REVISIONLINK = """\ %(line)s\ """ DIFFLINK = """\ (diff -r%(prev)s -r%(rev)s)\ """ # Recently changed entries NO_RECENT = """
    No %(FAQNAME)s entries were changed in the last %(period)s. """ VIEW_MENU = """
    View entries changed in the last... """ ONE_RECENT = VIEW_MENU + """ The following %(FAQNAME)s entry was changed in the last %(period)s: """ SOME_RECENT = VIEW_MENU + """ The following %(count)s %(FAQNAME)s entries were changed in the last %(period)s, most recently changed shown first: """ TAIL_RECENT = VIEW_MENU # Last changed banner on "all" (strftime format) LAST_CHANGED = "Last changed on %c %Z" # "Compat" command prologue (this has no tag) COMPAT = """

    The whole %(FAQNAME)s

    See also the %(FAQNAME)s Wizard.

    """ # Editing EDITHEAD = """ Click for Help """ REVIEWHEAD = EDITHEAD EDITFORM1 = """


    """ EDITFORM2 = """ Title:

    Log message (reason for the change):

    Please provide the following information for logging purposes:
    Name:
    Email:
    Password:
    Click this button to preview your changes. """ EDITFORM3 = """
    """ COMMIT = """ Click this button to commit your changes.
    """ NOCOMMIT_HEAD = """ To commit your changes, please correct the following errors in the form below and click the Preview Edit button.
    """ CANTCOMMIT_HEAD = """ Some required information is missing: Please use your browser's Back command to correct the form and commit again. """ NEWCONFLICT = """

    You are creating a new entry, but the entry number specified is not correct.

    The two most common causes of this problem are:

    (It is also possible that the last entry in the section was physically deleted, but this should not happen except through manual intervention by the FAQ maintainer.)

    Click here to try again.

    """ VERSIONCONFLICT = """

    You edited version %(editversion)s but the current version is %(version)s.

    The two most common causes of this problem are:

    Click here to reload the entry and try again.

    """ CANTWRITE = """ Can't write file %(file)s (%(why)s). """ FILEHEADER = """\ Title: %(title)s Last-Changed-Date: %(date)s Last-Changed-Author: %(author)s Last-Changed-Email: %(email)s Last-Changed-Remote-Host: %(REMOTE_HOST)s Last-Changed-Remote-Address: %(REMOTE_ADDR)s """ LOGHEADER = """\ Last-Changed-Date: %(date)s Last-Changed-Author: %(author)s Last-Changed-Email: %(email)s Last-Changed-Remote-Host: %(REMOTE_HOST)s Last-Changed-Remote-Address: %(REMOTE_ADDR)s %(log)s """ COMMITTED = """ Your changes have been committed. """ COMMITFAILED = """ Exit status %(sts)s. """ # Add/Delete ADD_HEAD = """ At the moment, new entries can only be added at the end of a section. This is because the entry numbers are also their unique identifiers -- it's a bad idea to renumber entries.

    Click on the section to which you want to add a new entry:

    """ ROULETTE = """

    Hit your browser's Reload button to play again.

    """ DELETE = """ At the moment, there's no direct way to delete entries. This is because the entry numbers are also their unique identifiers -- it's a bad idea to renumber entries.

    If you really think an entry needs to be deleted, change the title to "(deleted)" and make the body empty (keep the entry number in the title though). """ # Help file for the FAQ Edit Wizard HELP = """ Using the %(FAQNAME)s Edit Wizard speaks mostly for itself. Here are some answers to questions you are likely to ask:


    I can review an entry but I can't commit it.

    The commit button only appears if the following conditions are met:


    What is the password?

    At the moment, only PSA members will be told the password. This is a good time to join the PSA! See 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 automatigally become an anchor of the right type. Also, *word* is made italic (but only for single alphabetic words).


    How do I delineate paragraphs?

    Use blank lines to separate paragraphs.


    How do I enter example text?

    Any line that begins with a space or tab is assumed to be part of literal text. Blocks of literal text delineated by blank lines are placed inside <PRE>...</PRE>. """ # Load local customizations again, in case they set some other variables try: from faqcust import * except ImportError: pass