Mercurial > p > roundup > code
comparison roundup/configuration.py @ 3544:5cd1c83dea50
Features and fixes.
Feature:
- trackers may configure custom stop-words for the full-text indexer
Fixed:
- fixes in scripts/import_sf.py
- fix some unicode bugs in roundup-admin import
- Xapian indexer wasn't actually being used
- fix indexing of message content on roundup-admin import
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 06 Feb 2006 21:00:47 +0000 |
| parents | d3b02352484f |
| children | 61d48244e7a8 |
comparison
equal
deleted
inserted
replaced
| 3543:0735c4587852 | 3544:5cd1c83dea50 |
|---|---|
| 1 # Roundup Issue Tracker configuration support | 1 # Roundup Issue Tracker configuration support |
| 2 # | 2 # |
| 3 # $Id: configuration.py,v 1.31 2006-01-13 03:56:35 richard Exp $ | 3 # $Id: configuration.py,v 1.32 2006-02-06 21:00:44 richard Exp $ |
| 4 # | 4 # |
| 5 __docformat__ = "restructuredtext" | 5 __docformat__ = "restructuredtext" |
| 6 | 6 |
| 7 import getopt | 7 import getopt |
| 8 import imp | 8 import imp |
| 265 else: | 265 else: |
| 266 raise OptionValueError(self, value, self.class_description) | 266 raise OptionValueError(self, value, self.class_description) |
| 267 else: | 267 else: |
| 268 _val = value and 1 or 0 | 268 _val = value and 1 or 0 |
| 269 return _val | 269 return _val |
| 270 | |
| 271 class WordListOption(Option): | |
| 272 | |
| 273 """List of strings""" | |
| 274 | |
| 275 class_description = "Allowed values: comma-separated list of words" | |
| 276 | |
| 277 def _value2str(self, value): | |
| 278 return ','.join(value) | |
| 279 | |
| 280 def str2value(self, value): | |
| 281 return value.split(',') | |
| 270 | 282 |
| 271 class RunDetectorOption(Option): | 283 class RunDetectorOption(Option): |
| 272 | 284 |
| 273 """When a detector is run: always, never or for new items only""" | 285 """When a detector is run: always, never or for new items only""" |
| 274 | 286 |
| 448 (BooleanOption, "instant_registration", "no", | 460 (BooleanOption, "instant_registration", "no", |
| 449 "Register new users instantly, or require confirmation via\n" | 461 "Register new users instantly, or require confirmation via\n" |
| 450 "email?"), | 462 "email?"), |
| 451 (BooleanOption, "email_registration_confirmation", "yes", | 463 (BooleanOption, "email_registration_confirmation", "yes", |
| 452 "Offer registration confirmation by email or only through the web?"), | 464 "Offer registration confirmation by email or only through the web?"), |
| 465 (WordListOption, "indexer_stopwords", "", | |
| 466 "Additional stop-words for the full-text indexer specific to\n" | |
| 467 "your tracker. See the indexer source for the default list of\n" | |
| 468 "stop-words (eg. A,AND,ARE,AS,AT,BE,BUT,BY, ...)"), | |
| 453 )), | 469 )), |
| 454 ("tracker", ( | 470 ("tracker", ( |
| 455 (Option, "name", "Roundup issue tracker", | 471 (Option, "name", "Roundup issue tracker", |
| 456 "A descriptive name for your roundup instance."), | 472 "A descriptive name for your roundup instance."), |
| 457 (Option, "web", NODEFAULT, | 473 (Option, "web", NODEFAULT, |
