Feature request: editable welcome message
I know I can write interactive Python code to extract the welcome message, write it to a file so I can edit it, and suck it back in, but that should be easier than it is; if it needs to stay in config.db for reasons I don't understand, perhaps config.db could look in a configurable path for a file with a timestamp and decide "oh, it's changed, I should snarf in a new one". (Customizable welcome messages are almost always used, IMO.)
Also, it would be nice if the "subscription" text could appear at the beginning rather than the end.
I'll probably attempt to hack both these in.
"DM" == Dan Mick <dan.mick@West.Sun.COM> writes:
DM> I know I can write interactive Python code to extract the
DM> welcome message, write it to a file so I can edit it, and suck
DM> it back in
You'll want to look at bin/withlist, and if you've got the CVS snapshot, bin/config_list. Either can be used to make this easier.
DM> if it needs to stay in config.db for reasons I don't
DM> understand, perhaps config.db could look in a configurable
DM> path for a file with a timestamp and decide "oh, it's changed,
DM> I should snarf in a new one". (Customizable welcome messages
DM> are almost always used, IMO.)
Understand what config.db is: it's a marshaled Python dictionary. The keys of the dictionary correspond to attributes on the MailList object. What happens is that when a MailList object is saved, all of it's attributes (except those that start with an underscore) are examined and their values are placed into a dictionary. That dictionary is then marshaled into config.db for the list.
When the list is loaded, the config.db is unmarshaled and the MailList object's attributes are set from the dictionary's key/value pairs. It's a fairly simple, common, and portable (if not all that fast) way to do "a database" in Python.
-Barry
On lun, déc 20, 1999 at 01:35:09 -0500, Barry A. Warsaw wrote:
You'll want to look at bin/withlist, and if you've got the CVS snapshot, bin/config_list. Either can be used to make this easier.
Talking about config_list, I tried it last week and it was very nice, but I was hoping it would also dump the list of users with their subscribe attributes. This would let me move a list of users to a different list/different machine without having to copy the config.db and having to hack it afterwards.
Marc
Microsoft is to software what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ (friendly to non IE browsers) Finger marc_f@merlins.org for PGP key and other contact information
"MM" == Marc Merlin <marc_news@valinux.com> writes:
MM> Talking about config_list, I tried it last week and it was
MM> very nice, but I was hoping it would also dump the list of
MM> users with their subscribe attributes. This would let me move
MM> a list of users to a different list/different machine without
MM> having to copy the config.db and having to hack it afterwards.
bin/list_members
If you really want something that is a combination of those two, it would be easy for you to hack together some Python based on those two scripts. It's not a high priority for me though.
-Barry
On mar, déc 21, 1999 at 12:44:03 -0500, Barry A. Warsaw wrote:
"MM" == Marc Merlin <marc_news@valinux.com> writes:
MM> Talking about config_list, I tried it last week and it was MM> very nice, but I was hoping it would also dump the list of MM> users with their subscribe attributes. This would let me move
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
MM> a list of users to a different list/different machine without MM> having to copy the config.db and having to hack it afterwards.bin/list_members
I know about list_members :-) The problem is not getting the list of Emails, it's getting all the attributes for the user (nomail, hidden, password, etc, etc...)
I've moved users by feeding list_members into add_members, but the users have to get a new Email with their password, which is automatically generated, and if their nomail/hidden status is lost. My goal is to move users completely transparently for the user while keeping all the attributes.
Marc
Microsoft is to software what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ (friendly to non IE browsers) Finger marc_f@merlins.org for PGP key and other contact information
"MM" == Marc Merlin <marc_news@valinux.com> writes:
MM> I know about list_members :-) The problem is not getting the
MM> list of Emails, it's getting all the attributes for the user
MM> (nomail, hidden, password, etc, etc...)
Ah, good point. Want to contribute a script? :)
-Barry
participants (3)
-
Barry A. Warsaw -
Dan Mick -
Marc Merlin