- On 2007.05.02, in 83EB3FBBDF867245A54F47D4136B68C5D0E4B5@PHXDCEX012.phx-dc.dhl.com,
- "Jeff Kunzelman (DHL)" Jeff.Kunzelman@dhl.com wrote:
Is there a way that I can use the withlist command to change the display name of a mailman list?
You can, but you must write valid python code that manipulates properties of the list object. Withlist's function is to instantiate a list object to facilitate these manipulations.
This attached program is something we developed here for uchicago.edu some years ago, and have been using for a variety of batch and/or bulk manipulations of list properties. It's a bit more convenient than withlist or the config_list program that appears is more recent Mailman versions. In short, you can use configlist to display or set any list property *entirely on the command line*. Values are displayed as python expressions, and when setting a value, it must be set to a valid expression, but you don't need to write any actual code.
I don't think that I've posted this before -- I'm sorry if I'm wrong about that. Feel free to use it without any warranty, etc.
Examples: $ configlist.py mylist [ shows all properties of the list as python expressions ]
$ configlist.py mylist description description: 'This is the display name as shown on the listinfo page.'
$ configlist.py mylist description="'The mylist list is for me.'" [ sets description. Note the redundant quoting to protect the python expression from shell. ]
$ configlist.py mylist description=s/mylist/MyList/ [ use the s/// expression to munge the existing value of description ]
Configlist.py can be rather dangerous, because it allows changing any list property at all without any of the constraints that may be built into the web UI. Be sure you know what you're doing. You can use configlist.py before and after a web UI change to get a feel for how to script the same change in the future.
I apologize that the code is probably horrific to python enthusiasts. It was among my first efforts and I've not revisited it since actually learning the language.
-- -D. dgc@uchicago.edu, an Element of NSIT University of Chicago