[Mailman-Users] How to show name in the subscriber list mailman2.1.2 ?

2003-07-17 Thread CLOCHARD Nicolas
Hi,

I search to kown if the display of user name in the subscriber list is
possible under mailman 2.1.2
I parse all the option but I di not find it, nothing is on the FAQ and
nothing on the post of the mailing list.

If this is not possible, may be it can be a feature request for the futur
version of mailman.

regards,


--
Mailman-Users mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/

This message was sent to: [EMAIL PROTECTED]
Unsubscribe or change your options at
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] How to show name in the subscriber list mailman2.1.2 ?

2003-07-21 Thread John DeCarlo
Nicolas,

My Python programming skills are crude and self taught.  However, I 
modified list_members to include more information by default, as well as 
adding a "-a" option to list the full name of the user.

I have attached it here.  I keep it a separate name so that it doesn't 
get overwritten when I upgrade.

Maybe someone with more time and skill than I can use some of this to 
upgrade Mailman.

Feel free to use it as you wish.

CLOCHARD Nicolas wrote:

Hi,

I search to kown if the display of user name in the subscriber list is
possible under mailman 2.1.2
I parse all the option but I di not find it, nothing is on the FAQ and
nothing on the post of the mailing list.
If this is not possible, may be it can be a feature request for the futur
version of mailman.
--

John DeCarlo, My Views Are My Own

#! /usr/bin/python
#
# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# added --all or -a to get digest/nodigest and nomail(why) status as well as full name
#  John DeCarlo 2003-04-01
#

"""List all the members of a mailing list.

Usage: %(PROGRAM)s [options] listname

Where:

--output file
-o file
Write output to specified file instead of standard out.

--regular / -r
Print just the regular (non-digest) members.

--digest[=kind] / -d [kind]
Print just the digest members.  Optional argument can be "mime" or
"plain" which prints just the digest members receiving that kind of
digest.

--nomail[=why] / -n [why]
Print the members that have delivery disabled.  Optional argument can
be "byadmin", "byuser", "bybounce", or "unknown" which prints just the
users who have delivery disabled for that reason.  It can also be
"enabled" which prints just those member for whom delivery is
enabled.

--fullnames / -f
Include the full names in the output.

--all / -a
Include full names, email, digest/regular (mime/plain), nomail (why)

--preserve
-p
Output member addresses case preserved the way they were added to the
list.  Otherwise, addresses are printed in all lowercase.

--help
-h
Print this help message and exit.

listname is the name of the mailing list to use.

Note that if neither -r or -d is supplied, both regular members are printed
first, followed by digest members, but no indication is given as to address
status.
"""

import sys

import paths
from Mailman import mm_cfg
from Mailman import MailList
from Mailman import Errors
from Mailman import MemberAdaptor
from Mailman.i18n import _

from email.Utils import commaaddr

PROGRAM = sys.argv[0]
WHYCHOICES = {'enabled' : MemberAdaptor.ENABLED,
  'unknown' : MemberAdaptor.UNKNOWN,
  'byuser'  : MemberAdaptor.BYUSER,
  'byadmin' : MemberAdaptor.BYADMIN,
  'bybounce': MemberAdaptor.BYBOUNCE,
  }


def usage(code, msg=''):
if code:
fd = sys.stderr
else:
fd = sys.stdout
print >> fd, _(__doc__)
if msg:
print >> fd, msg
sys.exit(code)



def whymatches(mlist, addr, why):
# Return true if the `why' matches the reason the address is enabled, or
# in the case of why is None, that they are disabled for any reason
# (i.e. not enabled).
status = mlist.getDeliveryStatus(addr)
if why is None:
return status <> MemberAdaptor.ENABLED
return status == WHYCHOICES[why]



def main():
# Because of the optional arguments, we can't use getopt. :(
outfile = None
regular = None
digest = None
preserve = None
nomail = None
why = None
kind = None
fullnames = 0
all = 0

# Throw away the first (program) argument
args = sys.argv[1:]
if not args:
usage(0)

while 1:
try:
opt = args.pop(0)
except IndexError:
usage(1)
if opt in ('-h', '--help'):
usage(0)
elif opt in ('-f', '--fullnames'):
fullnames = 1
elif opt in ('-a', '--all'):
all = 1
fullnames = 1
elif opt in ('-p', '--preserve'):
preserve = 1
elif opt in ('-r', '--regular'):
regular = 1
elif opt in ('-o', '--o

Re: [Mailman-Users] How to show name in the subscriber list mailman2.1.2 ?

2003-07-22 Thread John DeCarlo
Rob,

Did you try "./list_members -a "?

This is just another command line script, used by humans or their 
scripts, but which is not used by Mailman AFAIK.

I have to admit I don't know exactly what you mean by "gone to one of my 
mailing lists".  It sounds like maybe you want to change the web 
interface or something else?

Rob Brandt wrote:

John;

This interests me too; thanks for this.

But how do you make it work?  I've copied your file into the /bin directory and
renamed it as "list_members", then gone to one of my mailing lists to view the
member list, but it still only lists the member's email address.
I suspect that I have to modify another script somewhere, but where?

Rob
--

John DeCarlo, My Views Are My Own



--
Mailman-Users mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
This message was sent to: [EMAIL PROTECTED]
Unsubscribe or change your options at
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] How to show name in the subscriber list mailman2.1.2 ?

2003-07-22 Thread John DeCarlo
Rob,

I can't help you with the web interface.  The cgi-bin programs are not 
plain text Python.  Presumably they are compiled code, binaries.

Perhaps you could go to the sourceforge Mailman site and submit this as 
an enhancement request.

Another alternative is to fiddle with the email "who" command - a script 
I posted earlier.  Then by email you can get subscriber's full names.

Rob Brandt wrote:

Yes, I'm sure I misunderstood since I may not have gotten the original question
that you answered.
I was hoping for a subscriber's list function including names that could be
browsed from the listinfo page.  I've never really understood why it's not
there in the first place; I've never seen the usefulness of showing a
subscriber's list on listinfo containing only email addresses.
--

John DeCarlo, My Views Are My Own



--
Mailman-Users mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
This message was sent to: [EMAIL PROTECTED]
Unsubscribe or change your options at
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] How to show name in the subscriber list mailman2.1.2 ?

2003-07-22 Thread Richard Barrett
On Tuesday, July 22, 2003, at 06:02 PM, John DeCarlo wrote:

Rob,

I can't help you with the web interface.  The cgi-bin programs are not 
plain text Python.  Presumably they are compiled code, binaries.

Not quite correct. The actual work of MM CGI programs is done by 
regular Python scripts located in $prefix/Mailman/Cgi

These Python scripts are actually run by compiled C security wrappers 
launched by the web server but the Python scripts do the work. Only if 
you want to introduce an additional CGI program do you need to worry 
about the security wrappers.

Perhaps you could go to the sourceforge Mailman site and submit this 
as an enhancement request.

Another alternative is to fiddle with the email "who" command - a 
script I posted earlier.  Then by email you can get subscriber's full 
names.

Rob Brandt wrote:

Yes, I'm sure I misunderstood since I may not have gotten the 
original question
that you answered.
I was hoping for a subscriber's list function including names that 
could be
browsed from the listinfo page.  I've never really understood why 
it's not
there in the first place; I've never seen the usefulness of showing a
subscriber's list on listinfo containing only email addresses.
--

John DeCarlo, My Views Are My Own


--
Mailman-Users mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
This message was sent to: [EMAIL PROTECTED]
Unsubscribe or change your options at
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] How to show name in the subscriber list mailman2.1.2 ?

2003-07-22 Thread Steve Burling
--On Tuesday, July 22, 2003 9:21 AM +0100 Rob Brandt <[EMAIL PROTECTED]> 
wrote:

Yes, I'm sure I misunderstood since I may not have gotten the original
question that you answered.
I was hoping for a subscriber's list function including names that could
be browsed from the listinfo page.  I've never really understood why it's
not there in the first place; I've never seen the usefulness of showing a
subscriber's list on listinfo containing only email addresses.
To which I reply:

Funny, when I go to the Membership Management pages for my lists (MM 
2.1.2), the membership list show the names.  Is it just that you want to 
see more at once, or what am I missing?

--
Steve Burling
University of Michigan, ICPSRVoice: +1 734 615.3779
330 Packard Street   FAX:   +1 734 647.8700
Ann Arbor, MI 48104-2910
--
Mailman-Users mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
This message was sent to: [EMAIL PROTECTED]
Unsubscribe or change your options at
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] How to show name in the subscriber list mailman2.1.2 ?

2003-07-23 Thread John DeCarlo
Hello,

Thanks to Richard, I came up with an extremely crude patch to do what 
Rob asked for.

I modified the FormatUsers function in ~mailman/Mailman/HTMLFormatter.py

At the end of this function there is a line:
got = Link(url, showing)
I changed it to be:
gotname = self.getMemberName(person)
got = Link(url, showing)
got = Container(got, '-', gotname)
And restarted Mailman.

The bad news is that the name is rendered as

u'John DeCarlo'
u"Bill O'Grady"
I don't know where the "u" comes from, but as I have said before, my 
Python skills are extremely crude.

Hope this helps.

Richard Barrett wrote:
On Tuesday, July 22, 2003, at 06:02 PM, John DeCarlo wrote:

Rob,

I can't help you with the web interface.  The cgi-bin programs are not 
plain text Python.  Presumably they are compiled code, binaries.

Not quite correct. The actual work of MM CGI programs is done by regular 
Python scripts located in $prefix/Mailman/Cgi

Rob Brandt wrote:

I was hoping for a subscriber's list function including names that 
could be
browsed from the listinfo page.  I've never really understood why 
it's not
there in the first place; I've never seen the usefulness of showing a
subscriber's list on listinfo containing only email addresses.
--

John DeCarlo, My Views Are My Own



--
Mailman-Users mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
This message was sent to: [EMAIL PROTECTED]
Unsubscribe or change your options at
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] How to show name in the subscriber list mailman2.1.2 ?

2003-07-23 Thread Richard Barrett
On Wednesday, July 23, 2003, at 03:33 PM, John DeCarlo wrote:

Hello,

Thanks to Richard, I came up with an extremely crude patch to do what 
Rob asked for.

I modified the FormatUsers function in 
~mailman/Mailman/HTMLFormatter.py

At the end of this function there is a line:
got = Link(url, showing)
I changed it to be:
gotname = self.getMemberName(person)
got = Link(url, showing)
got = Container(got, '-', gotname)
And restarted Mailman.

The bad news is that the name is rendered as

u'John DeCarlo'
u"Bill O'Grady"
I don't know where the "u" comes from, but as I have said before, my 
Python skills are extremely crude.

This is because the name is a Unicode string.

If you said this it might fix things:

gotname = str(self.getMemberName(person))

Hope this helps.

Richard Barrett wrote:
On Tuesday, July 22, 2003, at 06:02 PM, John DeCarlo wrote:
Rob,

I can't help you with the web interface.  The cgi-bin programs are 
not plain text Python.  Presumably they are compiled code, binaries.

Not quite correct. The actual work of MM CGI programs is done by 
regular Python scripts located in $prefix/Mailman/Cgi

Rob Brandt wrote:

I was hoping for a subscriber's list function including names that 
could be
browsed from the listinfo page.  I've never really understood why 
it's not
there in the first place; I've never seen the usefulness of showing 
a
subscriber's list on listinfo containing only email addresses.
--

John DeCarlo, My Views Are My Own




--
Mailman-Users mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
This message was sent to: [EMAIL PROTECTED]
Unsubscribe or change your options at
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org