diff options
| author | klm | 1998-11-22 01:34:15 +0000 |
|---|---|---|
| committer | klm | 1998-11-22 01:34:15 +0000 |
| commit | 1c4827ff8fc6425e82ac2ee519e92e0258179f3c (patch) | |
| tree | 611759f3ff7ab6b7c3714485c70352cdf30ec960 | |
| parent | 01c00d8bacf9e2bdfb512944236063d8c967b1f4 (diff) | |
| download | mailman-1c4827ff8fc6425e82ac2ee519e92e0258179f3c.tar.gz mailman-1c4827ff8fc6425e82ac2ee519e92e0258179f3c.tar.zst mailman-1c4827ff8fc6425e82ac2ee519e92e0258179f3c.zip | |
Here's two drastic policy-level changes to the archive mechanism.
First of all, i'm setting the default message archive style to
preserve horizontal whitespace, use <pre>, instead of putting a <br>
at the beginning of every line.
More deeply, i'm inhibiting all completely-uppercase variables from
being included in the pickled settings for the list. As with the
VERBOSE problem i addressed in my last checkin, changes to one of the
class default settings at any time *after* the archive object state
was resurrected would be reinstated thence forward - overriding the
defaults, and any other settings. This is not a good interface for
setting options - and i'm not really offering an alternative, other
than making the defaults come back the next time the list is
reinstated, rather than preserving the changes. We need to resolve
this - i suppose with an interface that distinguishes permanent from
temporary settings.
In general i've changed the defaults so they preserve more of the
structure of the postings (and included very brief comments presenting
what i could glean of the settings from the code - this code here does
not seem to have been written to be understood).
| -rw-r--r-- | Mailman/Archiver/HyperArch.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Mailman/Archiver/HyperArch.py b/Mailman/Archiver/HyperArch.py index f20221316..0a725ac97 100644 --- a/Mailman/Archiver/HyperArch.py +++ b/Mailman/Archiver/HyperArch.py @@ -100,7 +100,6 @@ article_template='''\ <HR> <!--beginarticle--> %(body)s - <!--endarticle--> <HR> <P><UL> @@ -418,10 +417,10 @@ class HyperArchive(pipermail.T): THREADLAZY=0 THREADLEVELS=3 - ALLOWHTML=1 - SHOWHTML=1 - IQUOTES=1 - SHOWBR=1 + ALLOWHTML=1 # "Lines between <html></html>" handled as is. + SHOWHTML=0 # Eg, nuke leading whitespace in html manner. + IQUOTES=1 # Italicize quoted text. + SHOWBR=0 # Add <br> onto every line html_hdr_tmpl=index_header_template html_foot_tmpl=index_footer_template @@ -917,8 +916,8 @@ class HyperArchive(pipermail.T): def __getstate__(self): d={} for each in self.__dict__.keys(): - if not (each in ['maillist','_lock_file','_unlocklist', - 'VERBOSE']): + if not (each in ['maillist','_lock_file','_unlocklist'] + or string.upper(each) == each): d[each] = self.__dict__[each] return d @@ -941,8 +940,10 @@ class HyperArchive(pipermail.T): quoted = quoted.end(0) prefix=CGIescape(L[:quoted]) + '<i>' suffix='</I>' - if self.SHOWHTML: suffix=suffix+'<BR>' - if not last_line_was_quoted: prefix='<BR>'+prefix + if self.SHOWHTML: + suffix=suffix+'<BR>' + if not last_line_was_quoted: + prefix='<BR>'+prefix L= L[quoted:] last_line_was_quoted=1 # Check for an e-mail address |
