From: short <> Date: Thu, 16 Oct 2003 11:27:44 +0000 (+0000) Subject: +Mailman support for captive X-Git-Url: https://git.jankratochvil.net/?p=www.jankratochvil.net.git;a=commitdiff_plain;h=810e158aecaa7e67ceafa8f2f162ac37277da917 +Mailman support for captive --- diff --git a/Mailman.pl b/Mailman.pl new file mode 100755 index 0000000..acd5c3d --- /dev/null +++ b/Mailman.pl @@ -0,0 +1,69 @@ +#! /usr/bin/perl +# +# $Id$ +# Mailman page Perl template. +# Copyright (C) 2003 Jan Kratochvil +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; exactly version 2 of June 1991 is required +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +package Mailman; +require 5.6.0; # at least 'use warnings;' but we need some 5.6.0+ modules anyway +use vars qw($VERSION $CVS_ID); +$VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; +$CVS_ID=q$Id$; +use strict; +use warnings; + +BEGIN{ open F,"Makefile"; our $top_dir=pop @{[split /\s/,(grep /^top_srcdir/,)[0]]}; eval "use lib '$top_dir'"; close F; } +use My::Web; +require CGI; +use URI::Escape; +require LWP::Simple; + + +my $W=My::Web->init( + "__PACKAGE__"=>__PACKAGE__, + "title"=>"Mailman Interface", + "no_job"=>1, + "args_check"=>{ + "email"=>'', + "pw"=>'', + "pw-conf"=>'', + "list"=>['^[-\w]+$'], + "back"=>'', + }, + ); +My::Web->heading(); + + +for my $list (@{$W->{"args"}{"list"}}) { + print "

List $list

\n"; + my $url_base=&{$W->{"mailman_url_sub"}}()."/subscribe/$list"; + my $t=LWP::Simple::get("$url_base?" + .join('&', + "list=$list", + map({ $_."=".uri_escape($W->{"args"}{$_}); } qw(email pw pw-conf)))); + $t=($t=~m#^.*]*>(.*?)#is)[0]; + $t=~s#(href=")(../[^"]*)(")#$1$url_base/$2$3#gi; + print $t; + print "
\n"; + } + +if ($W->{"args"}{"back"}) { + print '

'.a_href($W->{"args"}{"back"},'Back to the original page').'

'."\n"; + } + + +My::Web->footer(); diff --git a/Makefile.am b/Makefile.am index 583333d..f0e2cd8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -61,4 +61,5 @@ EXTRA_DIST+= \ robots.txt \ CV.html.pl \ SendMsg.pl \ - Contact.html.pl + Contact.html.pl \ + Mailman.pl diff --git a/WebConfig.pm b/WebConfig.pm index 502b9ec..bdcb236 100644 --- a/WebConfig.pm +++ b/WebConfig.pm @@ -53,6 +53,10 @@ our %WebConfig=( "pserver"=>':pserver:pserver:@cvs.jankratochvil.net', "pserver_path"=>"/cvs", "resume_url"=>$resume_url, + "mailman_url_sub"=>sub () { return "http://www.jankratochvil.net/mailman/"; }, + # { return "http://".$My::Web::W->{"r"}->hostname()."/mailman/"; }, + "pipermail_url_sub"=>sub () { return "http://www.jankratochvil.net/pipermail/"; }, + # { return "http://".$My::Web::W->{"r"}->hostname()."/pipermail/"; }, "heading"=>sub () { print ''."\n"; print ''."\n"; diff --git a/project/captive/Index.html.pl b/project/captive/Index.html.pl index bba283c..e66f7d5 100755 --- a/project/captive/Index.html.pl +++ b/project/captive/Index.html.pl @@ -39,6 +39,8 @@ my $W=My::Project->init_project( .reqpkg { font-style: italic; } .stuff { font-style: italic; font-size: larger; margin-left: 20%; margin-right: 10%; } .re { font-style: italic; } +table.mailman > * /* FIXME: What is it? */ > tr > th, +table.mailman > * /* FIXME: What is it? */ > tr > td { padding: 1ex; } ", "no_job"=>1, ); @@ -242,7 +244,7 @@ available Microsoft Windows drivers versions. Now you can execute:

'captive' package creates 'captive' user and 'captive' group on your system.

-

Package version conflicts

+

Package Version Conflicts

@@ -264,7 +266,7 @@ your convenience.

-

LUFS kernel driver module

+

LUFS Kernel Driver Module

@{[ a_href 'http://lufs.sourceforge.net/lufs/','LUFS' ]} (Linux Userland File System) needs Linux kernel module driver (lufs.o) compatible with your @@ -297,8 +299,38 @@ print rightimg <<"HERE",'reactos','ReactOS',"a_href"=>'http://www.reactos.com/'; HERE +my @lists=qw(captive-announce-list captive-list captive-devel-list); + print <<"HERE"; +

Mailing Lists

+ + +
+ @{[ map("",@lists) ]} + + @{[ map({ ""; } @lists) ]} + @{[ map({ ""; } @lists) ]} + @{[ + map((''),@lists) + ]} + +
$_
New versions announcements
+ (low traffic, recommended)
User supportDevelopment
".a_href(&{$W->{"mailman_url_sub"}}()."/listinfo/$_",'Mailman Infopage')."
".a_href(&{$W->{"pipermail_url_sub"}}()."/$_",'Archive')."
Subscribe?
+ + + + +
Email address:
Your new Mailman password:
Reenter your password:
+

+
+ + + + @{[ vskip "3ex" ]}

See also