blob: 9b5b8afcfc524666a427b08b8b70280b1b1b2645 [file] [log] [blame]
Guido van Rossumea31ea21997-05-26 05:43:29 +00001"""FAQ Wizard customization module.
Guido van Rossum1677e5b1997-05-26 00:07:18 +00002
Guido van Rossumea31ea21997-05-26 05:43:29 +00003Edit this file to customize the FAQ Wizard. For normal purposes, you
4should only have to change the FAQ section titles and the small group
5of parameters below it.
Guido van Rossum1677e5b1997-05-26 00:07:18 +00006
Guido van Rossumea31ea21997-05-26 05:43:29 +00007"""
Guido van Rossum1677e5b1997-05-26 00:07:18 +00008
9# Titles of FAQ sections
Guido van Rossumea31ea21997-05-26 05:43:29 +000010
Guido van Rossum1677e5b1997-05-26 00:07:18 +000011SECTION_TITLES = {
Guido van Rossum23052311997-05-26 06:12:50 +000012 # SectionNumber : SectionTitle; need at least one entry
Guido van Rossum1677e5b1997-05-26 00:07:18 +000013 1: "General information and availability",
Guido van Rossum1677e5b1997-05-26 00:07:18 +000014}
15
Guido van Rossumea31ea21997-05-26 05:43:29 +000016# Parameters you definitely want to change
17
Guido van Rossum23052311997-05-26 06:12:50 +000018SHORTNAME = "Generic" # FAQ name with "FAQ" omitted
19PASSWORD = "" # Password for editing
Guido van Rossum8daef372000-03-31 00:55:54 +000020OWNERNAME = "FAQ owner" # Name for feedback
21OWNEREMAIL = "nobody@anywhere.org" # Email for feedback
Guido van Rossumea31ea21997-05-26 05:43:29 +000022HOMEURL = "http://www.python.org" # Related home page
23HOMENAME = "Python home" # Name of related home page
Guido van Rossum64a10901998-02-19 21:29:38 +000024RCSBINDIR = "/usr/local/bin/" # Directory containing RCS commands
Guido van Rossumea31ea21997-05-26 05:43:29 +000025 # (must end in a slash)
26
27# Parameters you can normally leave alone
28
Guido van Rossumea31ea21997-05-26 05:43:29 +000029MAXHITS = 10 # Max #hits to be shown directly
30COOKIE_LIFETIME = 28*24*3600 # Cookie expiration in seconds
31 # (28*24*3600 = 28 days = 4 weeks)
Guido van Rossumb1823ad1997-12-09 16:04:46 +000032PROCESS_PREFORMAT = 1 # toggle whether preformatted text
33 # will replace urls and emails with
34 # HTML links
Guido van Rossumea31ea21997-05-26 05:43:29 +000035
Guido van Rossumfd67f731997-05-26 19:46:18 +000036# Markers appended to title to indicate recently change
37# (may contain HTML, e.g. <IMG>); and corresponding
38
39MARK_VERY_RECENT = " **" # Changed very recently
40MARK_RECENT = " *" # Changed recently
41DT_VERY_RECENT = 24*3600 # 24 hours
42DT_RECENT = 7*24*3600 # 7 days
43
44EXPLAIN_MARKS = """
Guido van Rossumd812c071997-05-26 20:15:44 +000045<P>(Entries marked with ** were changed within the last 24 hours;
Guido van Rossumfd67f731997-05-26 19:46:18 +000046entries marked with * were changed within the last 7 days.)
47<P>
48"""
49
50# Version -- don't change unless you edit faqwiz.py
51
Guido van Rossum8daef372000-03-31 00:55:54 +000052WIZVERSION = "1.0.4" # FAQ Wizard version
Guido van Rossumfd67f731997-05-26 19:46:18 +000053
Guido van Rossum23052311997-05-26 06:12:50 +000054import os, sys
Guido van Rossum8daef372000-03-31 00:55:54 +000055if os.name in ['nt',]:
56 # On NT we'll probably be running python from a batch file,
57 # so sys.argv[0] is not helpful
58 FAQCGI = 'faq.bat' # Relative URL of the FAQ cgi script
59 # LOGNAME is not typically set on NT
60 os.environ[ 'LOGNAME' ] = "FAQWizard"
61else:
62 # This parameter is normally overwritten with a dynamic value
63 FAQCGI = 'faqw.py' # Relative URL of the FAQ cgi script
64 FAQCGI = os.path.basename(sys.argv[0]) or FAQCGI
Guido van Rossum23052311997-05-26 06:12:50 +000065del os, sys
66
Guido van Rossum80e57fb1997-12-21 07:05:32 +000067# Perl (re module) style regular expression to recognize FAQ entry
68# files: group(1) should be the section number, group(2) should be the
69# question number. Both should be fixed width so simple-minded
70# sorting yields the right order.
Guido van Rossumfd67f731997-05-26 19:46:18 +000071
Guido van Rossum80e57fb1997-12-21 07:05:32 +000072OKFILENAME = r"^faq(\d\d)\.(\d\d\d)\.htp$"
Guido van Rossumfd67f731997-05-26 19:46:18 +000073
74# Format to construct a FAQ entry file name
75
76NEWFILENAME = "faq%02d.%03d.htp"
77
Guido van Rossum23052311997-05-26 06:12:50 +000078# Load local customizations on top of the previous parameters
79
80try:
81 from faqcust import *
Guido van Rossum178f58a1997-06-02 21:39:15 +000082except ImportError:
Guido van Rossum23052311997-05-26 06:12:50 +000083 pass
84
85# Calculated parameter names
86
87COOKIE_NAME = SHORTNAME + "-FAQ-Wizard" # Name used for Netscape cookie
88FAQNAME = SHORTNAME + " FAQ" # Name of the FAQ
89
Guido van Rossumea31ea21997-05-26 05:43:29 +000090# ----------------------------------------------------------------------
91
92# Anything below this point normally needn't be changed; you would
93# change this if you were to create e.g. a French translation or if
94# you just aren't happy with the text generated by the FAQ Wizard.
95
96# Most strings here are subject to substitution (string%dictionary)
97
98# RCS commands
99
Guido van Rossum8daef372000-03-31 00:55:54 +0000100import os
101if os.name in ['nt', ]:
102 SH_RLOG = RCSBINDIR + "rlog %(file)s < NUL"
103 SH_RLOG_H = RCSBINDIR + "rlog -h %(file)s < NUL"
104 SH_RDIFF = RCSBINDIR + "rcsdiff -r%(prev)s -r%(rev)s %(file)s < NUL"
105 SH_REVISION = RCSBINDIR + "co -p%(rev)s %(file)s < NUL"
106 ### Have to use co -l, or the file is not marked rw on NT
107 SH_LOCK = RCSBINDIR + "co -l %(file)s < NUL"
108 SH_CHECKIN = RCSBINDIR + "ci -u %(file)s < %(tfn)s"
109else:
110 SH_RLOG = RCSBINDIR + "rlog %(file)s </dev/null 2>&1"
111 SH_RLOG_H = RCSBINDIR + "rlog -h %(file)s </dev/null 2>&1"
112 SH_RDIFF = RCSBINDIR + "rcsdiff -r%(prev)s -r%(rev)s %(file)s </dev/null 2>&1"
113 SH_REVISION = RCSBINDIR + "co -p%(rev)s %(file)s </dev/null 2>&1"
114 SH_LOCK = RCSBINDIR + "rcs -l %(file)s </dev/null 2>&1"
115 SH_CHECKIN = RCSBINDIR + "ci -u %(file)s <%(tfn)s 2>&1"
116del os
Guido van Rossumea31ea21997-05-26 05:43:29 +0000117
118# Titles for various output pages (not subject to substitution)
119
120T_HOME = FAQNAME + " Wizard " + WIZVERSION
121T_ERROR = "Sorry, an error occurred"
122T_ROULETTE = FAQNAME + " Roulette"
123T_ALL = "The Whole " + FAQNAME
124T_INDEX = FAQNAME + " Index"
125T_SEARCH = FAQNAME + " Search Results"
126T_RECENT = "What's New in the " + FAQNAME
127T_SHOW = FAQNAME + " Entry"
128T_LOG = "RCS log for %s entry" % FAQNAME
Guido van Rossum8bc49c81997-05-26 19:10:37 +0000129T_REVISION = "RCS revision for %s entry" % FAQNAME
Guido van Rossumea31ea21997-05-26 05:43:29 +0000130T_DIFF = "RCS diff for %s entry" % FAQNAME
131T_ADD = "Add an entry to the " + FAQNAME
132T_DELETE = "Deleting an entry from the " + FAQNAME
133T_EDIT = FAQNAME + " Edit Wizard"
134T_REVIEW = T_EDIT + " - Review Changes"
135T_COMMITTED = T_EDIT + " - Changes Committed"
136T_COMMITFAILED = T_EDIT + " - Commit Failed"
137T_CANTCOMMIT = T_EDIT + " - Commit Rejected"
138T_HELP = T_EDIT + " - Help"
139
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000140# Generic prologue and epilogue
141
142PROLOGUE = '''
143<HTML>
144<HEAD>
145<TITLE>%(title)s</TITLE>
146</HEAD>
147
148<BODY BACKGROUND="http://www.python.org/pics/RedShort.gif"
149 BGCOLOR="#FFFFFF"
150 TEXT="#000000"
151 LINK="#AA0000"
152 VLINK="#906A6A">
153<H1>%(title)s</H1>
154'''
155
156EPILOGUE = '''
157<HR>
158<A HREF="%(HOMEURL)s">%(HOMENAME)s</A> /
Guido van Rossumea31ea21997-05-26 05:43:29 +0000159<A HREF="%(FAQCGI)s?req=home">%(FAQNAME)s Wizard %(WIZVERSION)s</A> /
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000160Feedback to <A HREF="mailto:%(OWNEREMAIL)s">%(OWNERNAME)s</A>
161
162</BODY>
163</HTML>
164'''
165
166# Home page
167
168HOME = """
Guido van Rossumea31ea21997-05-26 05:43:29 +0000169<H2>Search the %(FAQNAME)s:</H2>
170
171<BLOCKQUOTE>
172
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000173<FORM ACTION="%(FAQCGI)s">
174 <INPUT TYPE=text NAME=query>
175 <INPUT TYPE=submit VALUE="Search"><BR>
Guido van Rossumea31ea21997-05-26 05:43:29 +0000176 <INPUT TYPE=radio NAME=querytype VALUE=simple CHECKED>
177 Simple string
178 /
179 <INPUT TYPE=radio NAME=querytype VALUE=regex>
180 Regular expression
Guido van Rossum8bc49c81997-05-26 19:10:37 +0000181 /<BR>
Guido van Rossumd9936951997-05-26 16:35:27 +0000182 <INPUT TYPE=radio NAME=querytype VALUE=anykeywords>
183 Keywords (any)
184 /
185 <INPUT TYPE=radio NAME=querytype VALUE=allkeywords>
186 Keywords (all)
Guido van Rossumea31ea21997-05-26 05:43:29 +0000187 <BR>
188 <INPUT TYPE=radio NAME=casefold VALUE=yes CHECKED>
189 Fold case
190 /
191 <INPUT TYPE=radio NAME=casefold VALUE=no>
192 Case sensitive
193 <BR>
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000194 <INPUT TYPE=hidden NAME=req VALUE=search>
195</FORM>
196
Guido van Rossumea31ea21997-05-26 05:43:29 +0000197</BLOCKQUOTE>
198
199<HR>
200
201<H2>Other forms of %(FAQNAME)s access:</H2>
202
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000203<UL>
204<LI><A HREF="%(FAQCGI)s?req=index">FAQ index</A>
205<LI><A HREF="%(FAQCGI)s?req=all">The whole FAQ</A>
Guido van Rossumea31ea21997-05-26 05:43:29 +0000206<LI><A HREF="%(FAQCGI)s?req=recent">What's new in the FAQ?</A>
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000207<LI><A HREF="%(FAQCGI)s?req=roulette">FAQ roulette</A>
Guido van Rossumea31ea21997-05-26 05:43:29 +0000208<LI><A HREF="%(FAQCGI)s?req=add">Add a FAQ entry</A>
209<LI><A HREF="%(FAQCGI)s?req=delete">Delete a FAQ entry</A>
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000210</UL>
211"""
212
213# Index formatting
214
215INDEX_SECTION = """
216<P>
217<HR>
Guido van Rossumea31ea21997-05-26 05:43:29 +0000218<H2>%(sec)s. %(title)s</H2>
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000219<UL>
220"""
221
Guido van Rossumea31ea21997-05-26 05:43:29 +0000222INDEX_ADDSECTION = """
223<P>
224<LI><A HREF="%(FAQCGI)s?req=new&amp;section=%(sec)s">Add new entry</A>
225(at this point)
226"""
227
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000228INDEX_ENDSECTION = """
229</UL>
230"""
231
232INDEX_ENTRY = """\
Guido van Rossum030144d1997-05-26 16:02:56 +0000233<LI><A HREF="%(FAQCGI)s?req=show&amp;file=%(file)s">%(title)s</A>
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000234"""
235
Guido van Rossum8bc49c81997-05-26 19:10:37 +0000236LOCAL_ENTRY = """\
237<LI><A HREF="#%(sec)s.%(num)s">%(title)s</A>
238"""
239
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000240# Entry formatting
241
Guido van Rossumfd67f731997-05-26 19:46:18 +0000242ENTRY_HEADER1 = """
Guido van Rossumea31ea21997-05-26 05:43:29 +0000243<HR>
Guido van Rossumfd67f731997-05-26 19:46:18 +0000244<H2><A NAME="%(sec)s.%(num)s">%(title)s</A>\
245"""
246
247ENTRY_HEADER2 = """\
248</H2>
Guido van Rossumea31ea21997-05-26 05:43:29 +0000249"""
250
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000251ENTRY_FOOTER = """
Guido van Rossumea31ea21997-05-26 05:43:29 +0000252<A HREF="%(FAQCGI)s?req=edit&amp;file=%(file)s">Edit this entry</A> /
253<A HREF="%(FAQCGI)s?req=log&amp;file=%(file)s">Log info</A>
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000254"""
255
256ENTRY_LOGINFO = """
257/ Last changed on %(last_changed_date)s by
258<A HREF="mailto:%(last_changed_email)s">%(last_changed_author)s</A>
259"""
260
261# Search
262
263NO_HITS = """
264No hits.
265"""
266
267ONE_HIT = """
268Your search matched the following entry:
269"""
270
271FEW_HITS = """
Guido van Rossumea31ea21997-05-26 05:43:29 +0000272Your search matched the following %(count)s entries:
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000273"""
274
275MANY_HITS = """
Guido van Rossumea31ea21997-05-26 05:43:29 +0000276Your search matched more than %(MAXHITS)s entries.
277The %(count)s matching entries are presented here ordered by section:
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000278"""
279
280# RCS log and diff
281
282LOG = """
283Click on a revision line to see the diff between that revision and the
284previous one.
285"""
286
Guido van Rossum8bc49c81997-05-26 19:10:37 +0000287REVISIONLINK = """\
288<A HREF="%(FAQCGI)s?req=revision&amp;file=%(file)s&amp;rev=%(rev)s"
289>%(line)s</A>\
290"""
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000291DIFFLINK = """\
Guido van Rossum8bc49c81997-05-26 19:10:37 +0000292 (<A HREF="%(FAQCGI)s?req=diff&amp;file=%(file)s&amp;\
293prev=%(prev)s&amp;rev=%(rev)s"
294>diff -r%(prev)s -r%(rev)s</A>)\
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000295"""
296
297# Recently changed entries
298
299NO_RECENT = """
300<HR>
301No %(FAQNAME)s entries were changed in the last %(period)s.
302"""
303
Guido van Rossumea31ea21997-05-26 05:43:29 +0000304VIEW_MENU = """
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000305<HR>
Guido van Rossumea31ea21997-05-26 05:43:29 +0000306View entries changed in the last...
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000307<UL>
Guido van Rossumea31ea21997-05-26 05:43:29 +0000308<LI><A HREF="%(FAQCGI)s?req=recent&amp;days=1">24 hours</A>
309<LI><A HREF="%(FAQCGI)s?req=recent&amp;days=2">2 days</A>
310<LI><A HREF="%(FAQCGI)s?req=recent&amp;days=3">3 days</A>
311<LI><A HREF="%(FAQCGI)s?req=recent&amp;days=7">week</A>
312<LI><A HREF="%(FAQCGI)s?req=recent&amp;days=28">4 weeks</A>
313<LI><A HREF="%(FAQCGI)s?req=recent&amp;days=365250">millennium</A>
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000314</UL>
Guido van Rossumea31ea21997-05-26 05:43:29 +0000315"""
316
317ONE_RECENT = VIEW_MENU + """
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000318The following %(FAQNAME)s entry was changed in the last %(period)s:
319"""
320
Guido van Rossumea31ea21997-05-26 05:43:29 +0000321SOME_RECENT = VIEW_MENU + """
322The following %(count)s %(FAQNAME)s entries were changed
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000323in the last %(period)s, most recently changed shown first:
324"""
325
Guido van Rossumea31ea21997-05-26 05:43:29 +0000326TAIL_RECENT = VIEW_MENU
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000327
328# Last changed banner on "all" (strftime format)
329LAST_CHANGED = "Last changed on %c %Z"
330
Guido van Rossumea31ea21997-05-26 05:43:29 +0000331# "Compat" command prologue (this has no <BODY> tag)
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000332COMPAT = """
333<H1>The whole %(FAQNAME)s</H1>
Guido van Rossum2aa78ef1997-11-21 16:37:54 +0000334See also the <A HREF="%(FAQCGI)s?req=home">%(FAQNAME)s Wizard</A>.
335<P>
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000336"""
337
338# Editing
339
340EDITHEAD = """
341<A HREF="%(FAQCGI)s?req=help">Click for Help</A>
342"""
343
344REVIEWHEAD = EDITHEAD
345
346
347EDITFORM1 = """
348<FORM ACTION="%(FAQCGI)s" METHOD=POST>
349<INPUT TYPE=hidden NAME=req VALUE=review>
350<INPUT TYPE=hidden NAME=file VALUE=%(file)s>
351<INPUT TYPE=hidden NAME=editversion VALUE=%(editversion)s>
352<HR>
353"""
354
355EDITFORM2 = """
356Title: <INPUT TYPE=text SIZE=70 NAME=title VALUE="%(title)s"><BR>
357<TEXTAREA COLS=72 ROWS=20 NAME=body>%(body)s
358</TEXTAREA><BR>
359Log message (reason for the change):<BR>
360<TEXTAREA COLS=72 ROWS=5 NAME=log>%(log)s
361</TEXTAREA><BR>
362Please provide the following information for logging purposes:
363<TABLE FRAME=none COLS=2>
364 <TR>
365 <TD>Name:
366 <TD><INPUT TYPE=text SIZE=40 NAME=author VALUE="%(author)s">
367 <TR>
368 <TD>Email:
369 <TD><INPUT TYPE=text SIZE=40 NAME=email VALUE="%(email)s">
370 <TR>
371 <TD>Password:
372 <TD><INPUT TYPE=password SIZE=20 NAME=password VALUE="%(password)s">
373</TABLE>
374
375<INPUT TYPE=submit NAME=review VALUE="Preview Edit">
376Click this button to preview your changes.
377"""
378
379EDITFORM3 = """
380</FORM>
381"""
382
383COMMIT = """
384<INPUT TYPE=submit NAME=commit VALUE="Commit">
385Click this button to commit your changes.
386<HR>
387"""
388
Guido van Rossum2d3b0d71998-12-23 21:33:09 +0000389NOCOMMIT_HEAD = """
390To commit your changes, please correct the following errors in the
391form below and click the Preview Edit button.
392<UL>
393"""
394NOCOMMIT_TAIL = """
395</UL>
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000396<HR>
397"""
398
399CANTCOMMIT_HEAD = """
400Some required information is missing:
401<UL>
402"""
Guido van Rossum2d3b0d71998-12-23 21:33:09 +0000403NEED_PASSWD = "<LI>You must provide the correct password.\n"
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000404NEED_AUTHOR = "<LI>You must enter your name.\n"
405NEED_EMAIL = "<LI>You must enter your email address.\n"
406NEED_LOG = "<LI>You must enter a log message.\n"
407CANTCOMMIT_TAIL = """
408</UL>
409Please use your browser's Back command to correct the form and commit
410again.
411"""
412
Guido van Rossumea31ea21997-05-26 05:43:29 +0000413NEWCONFLICT = """
414<P>
415You are creating a new entry, but the entry number specified is not
416correct.
417<P>
418The two most common causes of this problem are:
419<UL>
420<LI>After creating the entry yourself, you went back in your browser,
421 edited the entry some more, and clicked Commit again.
422<LI>Someone else started creating a new entry in the same section and
423 committed before you did.
424</UL>
425(It is also possible that the last entry in the section was physically
426deleted, but this should not happen except through manual intervention
427by the FAQ maintainer.)
428<P>
429<A HREF="%(FAQCGI)s?req=new&amp;section=%(sec)s">Click here to try
430again.</A>
431<P>
432"""
433
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000434VERSIONCONFLICT = """
435<P>
436You edited version %(editversion)s but the current version is %(version)s.
437<P>
438The two most common causes of this problem are:
439<UL>
440<LI>After committing a change, you went back in your browser,
441 edited the entry some more, and clicked Commit again.
442<LI>Someone else started editing the same entry and committed
443 before you did.
444</UL>
445<P>
Guido van Rossumea31ea21997-05-26 05:43:29 +0000446<A HREF="%(FAQCGI)s?req=show&amp;file=%(file)s">Click here to reload
447the entry and try again.</A>
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000448<P>
449"""
450
451CANTWRITE = """
452Can't write file %(file)s (%(why)s).
453"""
454
455FILEHEADER = """\
456Title: %(title)s
457Last-Changed-Date: %(date)s
458Last-Changed-Author: %(author)s
459Last-Changed-Email: %(email)s
460Last-Changed-Remote-Host: %(REMOTE_HOST)s
461Last-Changed-Remote-Address: %(REMOTE_ADDR)s
462"""
463
464LOGHEADER = """\
465Last-Changed-Date: %(date)s
466Last-Changed-Author: %(author)s
467Last-Changed-Email: %(email)s
468Last-Changed-Remote-Host: %(REMOTE_HOST)s
469Last-Changed-Remote-Address: %(REMOTE_ADDR)s
470
471%(log)s
472"""
473
474COMMITTED = """
475Your changes have been committed.
476"""
477
478COMMITFAILED = """
Guido van Rossum6592b3c1997-11-11 17:18:48 +0000479Exit status %(sts)s.
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000480"""
481
Guido van Rossumea31ea21997-05-26 05:43:29 +0000482# Add/Delete
483
484ADD_HEAD = """
485At the moment, new entries can only be added at the end of a section.
486This is because the entry numbers are also their
487unique identifiers -- it's a bad idea to renumber entries.
488<P>
489Click on the section to which you want to add a new entry:
490<UL>
491"""
492
493ADD_SECTION = """\
494<LI><A HREF="%(FAQCGI)s?req=new&amp;section=%(section)s">%(section)s. %(title)s</A>
495"""
496
497ADD_TAIL = """
498</UL>
499"""
500
Guido van Rossumf1ead1a1997-08-28 02:38:01 +0000501ROULETTE = """
502<P>Hit your browser's Reload button to play again.<P>
503"""
504
Guido van Rossumea31ea21997-05-26 05:43:29 +0000505DELETE = """
506At the moment, there's no direct way to delete entries.
507This is because the entry numbers are also their
508unique identifiers -- it's a bad idea to renumber entries.
509<P>
510If you really think an entry needs to be deleted,
511change the title to "(deleted)" and make the body
512empty (keep the entry number in the title though).
513"""
514
515# Help file for the FAQ Edit Wizard
516
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000517HELP = """
518Using the %(FAQNAME)s Edit Wizard speaks mostly for itself. Here are
519some answers to questions you are likely to ask:
520
521<P><HR>
522
523<H2>I can review an entry but I can't commit it.</H2>
524
525The commit button only appears if the following conditions are met:
526
527<UL>
528
529<LI>The Name field is not empty.
530
531<LI>The Email field contains at least an @ character.
532
533<LI>The Log message box is not empty.
534
535<LI>The Password field contains the proper password.
536
537</UL>
538
539<P><HR>
540
541<H2>What is the password?</H2>
542
543At the moment, only PSA members will be told the password. This is a
544good time to join the PSA! See <A
545HREF="http://www.python.org/psa/">the PSA home page</A>.
546
547<P><HR>
548
549<H2>Can I use HTML in the FAQ entry?</H2>
550
Guido van Rossum8daef372000-03-31 00:55:54 +0000551Yes, if you include it in &lt;HTML&rt; and &lt;/HTML&gt; tags.
552<P>
553Also, if you include a URL or an email address in the text it will
Guido van Rossum1677e5b1997-05-26 00:07:18 +0000554automatigally become an anchor of the right type. Also, *word*
555is made italic (but only for single alphabetic words).
556
557<P><HR>
558
559<H2>How do I delineate paragraphs?</H2>
560
561Use blank lines to separate paragraphs.
562
563<P><HR>
564
565<H2>How do I enter example text?</H2>
566
567Any line that begins with a space or tab is assumed to be part of
568literal text. Blocks of literal text delineated by blank lines are
569placed inside &lt;PRE&gt;...&lt;/PRE&gt;.
570"""
Guido van Rossum5bf4d001997-06-03 22:03:22 +0000571
572# Load local customizations again, in case they set some other variables
573
574try:
575 from faqcust import *
576except ImportError:
577 pass