--- /dev/null
+#! /usr/bin/perl
+#
+# $Id$
+# Mailman page Perl template.
+# Copyright (C) 2003 Jan Kratochvil <project-www.jankratochvil.net@jankratochvil.net>
+#
+# 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/,<F>)[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 "<h1>List <i>$list</i></h1><blockquote>\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#^.*<body\b[^>]*>(.*?)</body>#is)[0];
+ $t=~s#(href=")(../[^"]*)(")#$1$url_base/$2$3#gi;
+ print $t;
+ print "</blockquote>\n";
+ }
+
+if ($W->{"args"}{"back"}) {
+ print '<h1>'.a_href($W->{"args"}{"back"},'Back to the original page').'</h1>'."\n";
+ }
+
+
+My::Web->footer();
robots.txt \
CV.html.pl \
SendMsg.pl \
- Contact.html.pl
+ Contact.html.pl \
+ Mailman.pl
"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 '<table border="0" align="center" style="font-size: larger;">'."\n";
print '<col width="20%">'."\n";
.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,
);
<p>'<b>captive</b>' package creates '<b>captive</b>' user and '<b>captive</b>' group on your system.</p>
-<h2>Package version conflicts</h2>
+<h2>Package Version Conflicts</h2>
<dl>
</dl>
-<h2>LUFS kernel driver module</h2>
+<h2>LUFS Kernel Driver Module</h2>
<p>@{[ a_href 'http://lufs.sourceforge.net/lufs/','LUFS' ]} (Linux Userland File
System) needs Linux kernel module driver (<i>lufs.o</i>) compatible with your
HERE
+my @lists=qw(captive-announce-list captive-list captive-devel-list);
+
print <<"HERE";
+<a name="lists"><h2>Mailing Lists</h2></a>
+
+<form action="@{[ top_dir("/Mailman.pl") ]}" method="post">
+ <table border="1" class="mailman"
+ style="text-align: center; border-collapse: collapse; border-style: solid; border-width: 1px;">
+ <tr>@{[ map("<th>$_</th>",@lists) ]}</tr>
+ <tr><td>New versions announcements<br />
+ (low traffic, recommended)</td><td>User support</td><td>Development</td></tr>
+ <tr>@{[ map({ "<td>".a_href(&{$W->{"mailman_url_sub"}}()."/listinfo/$_",'Mailman Infopage')."</td>"; } @lists) ]}</tr>
+ <tr>@{[ map({ "<td>".a_href(&{$W->{"pipermail_url_sub"}}()."/$_",'Archive')."</td>"; } @lists) ]}</tr>
+ <tr>@{[
+ map(('<td><input type="checkbox" name="list" value="'.$_.'"'
+ .($_ ne "captive-announce-list" ? '' : ' checked="checked"')
+ .' /> Subscribe?</td>'),@lists)
+ ]}</tr>
+ <tr><td colspan="3">
+ <table border="0">
+ <tr><td>Email address: </td><td><input type="text" name="email" size="30" /></td></tr>
+ <tr><td>Your new Mailman password:</td><td><input type="password" name="pw" size="15" /></td></tr>
+ <tr><td>Reenter your password: </td><td><input type="password" name="pw-conf" size="15" /></td></tr>
+ </table>
+ <p><input type="submit" name="email-button" value="Subscribe me" /></p>
+ </td></tr>
+ </table>
+<input type="hidden" name="back" value="/project/captive/#lists" />
+</form>
+
+
@{[ vskip "3ex" ]}
<h1>See also</h1>