[Mailman-Users] Passing the list name to the cgi scripts, called with backticks in Perl

2007-07-17 Thread BobLaJolla
Hello,
 
In order to utilize my site's dynamic header, footer, banner ad  programs, 
etc., I am generating the mailman HTML enveloping content with a Perl  script, 
and calling mailman's cgi scripts, as appropriate, using a shell  command.  
Example below:
 
 
 
$listinfo_output =  `/usr/local/mailman/cgi-bin/listinfo`;
 
 
Note backticks to invoke this script from the shell in my  Perl script.


This successfully loads the variable $listinfo_output with the  output from 
the mailman/cgi-bin/listinfo command, from there I can print or  extract 
content from the HTML as useful.
 
My problem is, to get any list-specific output from the  mailman/cgi-bin/* 
scripts, I need to be able to pass the listname to the script  - and I can't 
figure out how to do this with the shell command.  If  I follow the standard 
syntax from the web (e.g.  `/usr/local/mailman/cgi-bin/listinfo/somelist`) the 
shell looks for a  non-existent program in the non-existent listinfo directory 
(listinfo is,  of course, a script).
 
Using the scheme outlined above, how can I pass the listname to the  various 
cgi-bin scripts from mailman to capture their list-specific output for  
customized pages?  
 
I do realize there are templates for customizing the HTML, but  these are not 
useful for server side include files and scripts, on which my site  depends 
heavily.  
 
Thanks in advance...  :o)
 
Bob R





** Get a sneak peek of the all-new AOL at 
http://discover.aol.com/memed/aolcom30tour
--
Mailman-Users mailing list
Mailman-Users@python.org
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/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: 
http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp


Re: [Mailman-Users] Passing the list name to the cgi scripts, called with backticks in Perl

2007-07-17 Thread Mark Sapiro
BobLaJolla wrote:
 
My problem is, to get any list-specific output from the  mailman/cgi-bin/* 
scripts, I need to be able to pass the listname to the script  - and I can't 
figure out how to do this with the shell command.  If  I follow the standard 
syntax from the web (e.g.  `/usr/local/mailman/cgi-bin/listinfo/somelist`) the 
shell looks for a  non-existent program in the non-existent listinfo directory 
(listinfo is,  of course, a script).
 
Using the scheme outlined above, how can I pass the listname to the  various 
cgi-bin scripts from mailman to capture their list-specific output for  
customized pages?  


You need to do what your web server does. Namely, in the above example,
it sets

PATH_INFO='/somelist'

in the environment it passes to the CGI. In general, an HTTP GET for a
URL like http://example.com/mailman/wrapper/more/stuff?query will
result in the web server setting

PATH_INFO='/more/stuff'
QUERY_STRING='query'

(and a bunch of other stuff, most of which we don't look at) in the
environment it passes to the wrapper.

-- 
Mark Sapiro [EMAIL PROTECTED]   The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan

--
Mailman-Users mailing list
Mailman-Users@python.org
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/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: 
http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp