Interfacing to Mailman data
Hi Barry,
Hope you had a good vacation.
A while ago I mentioned that I was interfacing with Mailman (via PHP) by issuing the /bin commands and parsing the results. As you pointed out, that may not be very efficient, but my rationale is that your scripts are doing the "behind the scenes" things which I want to rely on. A non-parsing but still relevant example: I think you do database locking when, say, creating a new list. For me, the extra process in firing up the /bin command is negligible. It would be nice to not have to parse unwieldy output, though.
What about having interface-friendly versions of these commands? So, instead of executing the /bin/list_lists command and getting ...
6 matching mailing lists found: Administrivia - Discussions pertaining to cruciverb web site cruciverb-l - Crossword Constructors Discussion List cwml - Crossword Markup Language List Mailman - [no description available] BQ-Newsletter - The Broken Cue Newsletter Testing - [no description available]
... I could instead execute a different command and get a comma-delimited list:
Administrivia,cruciverb-l,cwml,Mailman,BQ-Newsletter,Testing
or, get more info if required, such as name, security, description, one record per line:
Administrivia,0,Discussions pertaining to cruciverb web site cruciverb-l,0,Crossword Constructors Discussion List cwml,1,Crossword Markup Language List Mailman,0,[no description available] Newsletter,0,The Broken Cue Newsletter Testing,1,[no description available]
And it would be most sublime to be able to issue the list_config command and have it work with stdin/stdout instead of files and using the same kind of delimited layout as shown above.
I know you're a busy guy. So how can I help? I'm not a Python programmer yet but I'm willing to become one to get these kinds of things to happen. Could you help me get started by indicating what files I would need to copy and then modify to, say, create an interface-friendly version of list_lists?
Best, Kevin McCann
On Mon, 28 Jul 2003, Kevin McCann wrote:
I know you're a busy guy. So how can I help?
Great--that's the whole point of the open source movement. If it doesn't do what you need, you are free to make modifications. If you feel your modifications would be generally useful, please consider donating them back to the commuity that provided the original tool.
I'm not a Python programmer yet but I'm willing to become one to get these kinds of things to happen.
Luckily python is a very easy langauge to learn.
Could you help me get started by indicating what files I would need to copy and then modify to, say, create an interface-friendly version of list_lists?
Believe it or not, the answer to that question is the file named "list_lists" located in the bin directory.
Good Luck!
Dale Newfield <Dale@Newfield.org>
"They that can give up essential liberty to obtain a little safety deserve neither liberty nor safety." - Benjamin Franklin, on the Statue of Liberty
On Mon 2003-07-28 11:29:52 -0400, Kevin McCann wrote:
A while ago I mentioned that I was interfacing with Mailman (via PHP) by issuing the /bin commands and parsing the results.
I get the feeling a lot of people are doing this.
What about having interface-friendly versions of these commands? So, instead of executing the /bin/list_lists command and getting ... ... ... I could instead execute a different command and get a comma-delimited list.
This would help with your parsing, but isn't as good as a proper API. Mailman 3 should address this problem, from Barry's postings in this thread:
http://mail.python.org/pipermail/mailman-developers/2003-July/thread.html#15...
So, as the other poster who replied to your mail said, you could address the problem yourself and try to contribute your improvements, but it doesn't sound like they'll be useful for Mailman in the longer run.
Incidentally, as far as list_lists goes, the --bare parameter will give you output which is more machine-friendly than the default.
-- Write friendlier email : http://www.math.fu-berlin.de/~guckes/mail/edit.html Certify your signature : http://sig.jellybaby.net/ [101f42d9ex623]
On Wed, 2003-07-30 at 13:38, Chris Boulter wrote:
On Mon 2003-07-28 11:29:52 -0400, Kevin McCann wrote:
A while ago I mentioned that I was interfacing with Mailman (via PHP) by issuing the /bin commands and parsing the results.
I get the feeling a lot of people are doing this.
What about having interface-friendly versions of these commands? So, instead of executing the /bin/list_lists command and getting ... ... ... I could instead execute a different command and get a comma-delimited list.
This would help with your parsing, but isn't as good as a proper API. Mailman 3 should address this problem, from Barry's postings in this thread:
http://mail.python.org/pipermail/mailman-developers/2003-July/thread.html#15...
Right. But it was from that thread in which I read the following:
======
that's the most expedient way to hook Mailman up to foreign systems. I /would/ however like to have some requirements for that hookup so we can tailor the scripts to those specific needs. For example, the current crop of scripts in bin/ were written primarily to solve a problem that the human operator was having. That may not be the most efficient or useful interface for hooking two programs up.
-Barry
Which is what my post was based on. It sounded like there was going to be an effort to whip up some versions of the /bin commands that would do the kinds of things I was talking about. But Barry also indicated he wanted input with regard to the requirements. And I also know he's already got a lot on his plate. But I do sense that it's not just little ol' me that could benefit from a set of modified /bin commands. And I'd like to help in this exercise in any way I can.
So, as the other poster who replied to your mail said, you could address the problem yourself and try to contribute your improvements, but it doesn't sound like they'll be useful for Mailman in the longer run.
Version 3 could be a long way away. I do need to take the other approach. If an API eventually comes to fruition, all the good, and I'll make the adjustments in my PHP app when that happens.
Incidentally, as far as list_lists goes, the --bare parameter will give you output which is more machine-friendly than the default.
Yes, I saw that. Unfortunately it does not return the list description, which I sometimes need.
I'm going to dig in and see what I can get done and will certainly share ouptuts that might be of value to others..
Cheers, Kevin
participants (3)
-
Chris Boulter -
Dale Newfield -
Kevin McCann