-#! /usr/bin/perl
-#
# $Id$
# Main page of 'My::Project::postget'
-# Copyright (C) 2003 Jan Kratochvil <project-www.jankratochvil.net@jankratochvil.net>
+# Copyright (C) 2003-2005 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
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;
-Wuse 'My::Project';
-Wuse 'project::postget::ListItem';
+Wuse 'project::Lib';
-My::Project->init_project(
- "__PACKAGE__"=>__PACKAGE__,
- "ListItem"=>\@project::postget::ListItem::ListItem,
+our @ListItem=(
+ "name"=>"postget",
+ "platform"=>"web",
+ "trivia"=>1,
+ "priority"=>380,
+ # FIXME: 'http://cvs.jankratochvil.net/viewcvs/' -> $W->{"project_viewcvs"}
+ "download"=>'http://cvs.jankratochvil.net/viewcvs/'."*checkout*/nethome/WWW/cgi-bin/postget.php?rev=HEAD",
+ "summary"=>sub {
+ return "Bookmark ".a_href('http://www.w3.org/TR/html4/interact/forms.html#h-17.13.1','POST')
+ .' forms, hide passwords';
+ },
+ "license"=>"PD",
+ "maintenance"=>"ready",
+ "language"=>"PHP",
+ "description"=>sub { return <<"HERE"; },
+<p>You cannot bookmark pre-filled forms to your browser bookmarks. Although
+browsers support storing of form data you still have to load the form page and
+click its submit button. This script will allow you to:</p>
+<ul>
+ <li>Store all @{[ a_href 'http://www.w3.org/TR/html4/interact/forms.html#h-17.13.1','POST' ]}ed
+ form data as @{[ a_href 'http://www.w3.org/TR/html4/interact/forms.html#h-17.13.1','GET' ]} data
+ (after '<b>?</b>' URL delimiter).</li>
+ <li>Replace all sensitive passwords by indirect references to your <b>priv</b> directory
+ to allow you to make your bookmark file itself public.</li>
+</ul>
+HERE
);
+sub handler
+{
+project::Lib->init();
+
print <<"HERE";
</li>
<li>
<p>Edit path to your <b>priv</b> directory in the stored
- <b>@{[ a_href $W->{"project_viewcvs"}."*checkout*/nethome/WWW/cgi-bin/postget.php?rev=HEAD",'postget.php' ]}</b>.
+ <b>@{[ a_href $W->{"project_viewcvs"}."*checkout*/nethome/WWW/cgi-bin/postget.php?rev=HEAD",'postget.php' ]}</b>.</p>
</li>
<li>
<p>Bookmark the following @{[ a_href 'http://freshmeat.net/','Freshmeat' ]} URL:
- @{[ CGI::escapeHTML(q{http://localhost/~lace/cgi-bin/postget.php?_postget=http%3A%2F%2Ffreshmeat.net%2Flogin%2F&url=%2F&username=YOUR_USERNAME&password=_priv_postget.freshmeat.net.pwd&persistent=1}) ]}
+ @{[ escapeHTML(q{http://localhost/~lace/cgi-bin/postget.php?_postget=http%3A%2F%2Ffreshmeat.net%2Flogin%2F&url=%2F&username=YOUR_USERNAME&password=_priv_postget.freshmeat.net.pwd&persistent=1}) ]}
</p>
<p>(Replace <b>YOUR_USERNAME</b> with your @{[ a_href 'http://freshmeat.net/','Freshmeat' ]}
account name.</p>
HERE
-My::Web->footer();
+exit;
+}
+1;