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