Is there a reason not to implement the config_list command ?
Hello
Is it meant to be implemented ? and if so, how is it recommended to do (for someone new to mailman 3 programming)
Thanks
On 6/10/18 11:54 PM, Asaf Ohayon wrote:
Is it meant to be implemented ? and if so, how is it recommended to do (for someone new to mailman 3 programming)
It depends what you are looking for. The Mailman 2.1 config_list command can do quite a lot. It has both an output (config dump) mode and an input (config load/alter/etc) mode.
It would be a simple matter to implement a mailman sub-command to dump a list's config if all you want are list attributes and their values. If you want all the commentary that config_list produces, that is more difficult because config_list basically gets all that from the Mailman 2.1 web UI and in Mailman 3, the web UI is decoupled from the core and the core really knows nothing about it or if it even exists. You would need to get it from the various interface definitions in mailman/interfaces/mailinglist.py.
For the input mode if all you wanted to support was input containing lines of the form
attribute=value
that wouldn't be too difficult to do, but config_list can to much more because it makes the list object available to the input script so the input script can do anything at all to the list.
So, as I said, it depends on what config_list functionality you are looking for. If what you want is a way to configure a list for a particular "style", Mailman 3 has a concept of List Style to be applied when the list is created. See <http://mailman.readthedocs.io/en/latest/src/mailman/styles/docs/styles.html>. This, rather than config_list is intended to be the way to configure a particular list style.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Asaf Ohayon
-
Mark Sapiro