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