our @ISA=qw(My::Web Exporter);
+use constant ENTRIES =>top_dir()."/project/CVS/Entries";
+use constant ENTRIES_LOG=>top_dir()."/project/CVS/Entries.Log";
+
+
sub print_project ($)
{
my($class,$ListItem)=@_;
my %known=(
"active"=>"Ready to use. Project is now actively developed.",
"ready"=>"Ready to use. Maintained.",
+ "pending"=>"Patch is ready to be applied to the mainstream.",
"dead"=>"Dead code, no longer supported.",
"merge"=>"Functions belong to existing other project.",
"obsolete"=>"Obsoleted.",
return "Download".$_[0];
},
"format"=>sub ($) {
- return a_href($_[0],CGI::escapeHTML($_[0]));
+ return a_href($_[0],CGI::escapeHTML(File::Basename::basename($_[0])));
}},
{"key"=>qr(^link\b),"text"=>sub ($) {
$_[0]=~s/^link-//;
["Download CVS snapshot" ,
$W->{"project_viewcvs"}.$val."/".File::Basename::basename($val).".tar.gz?tarball=1"
.(!$branch ? "" : '&only_with_tag='.$branch)],
- ["CVS ChangeLog" ,$W->{"top_dir"}."/project/ChangeLog.txt.pl?cvs=$val"])));
+ ["CVS ChangeLog" ,top_dir()."/project/ChangeLog.txt.pl?cvs=$val"])));
}},
{"key"=>"ownership","text"=>"Ownership"},
{"key"=>"sponsorship","text"=>"Sponsorship"},
return $W;
}
+sub item_hash_read ()
+{
+ my %dirs;
+ for my $ENTRIES (ENTRIES,ENTRIES_LOG) {
+ local *E;
+ next if !open E,$ENTRIES;
+ while (<E>) {
+ chomp;
+ do { $dirs{$1}=1; next; } if m#^(?:A )?D/([^/]*)/#;
+ next if m#^/([^/]*)/# ;
+ next if /^D$/;
+ warn "File $ENTRIES contains invalid line \"$_\": $!";
+ }
+ close E;
+ }
+
+ my %item;
+ for my $dir (keys(%dirs)) {
+ Wrequire "project::${dir}::ListItem";
+ my $item=eval('\@project::'.$dir.'::ListItem::ListItem');
+ do { warn "Broken project/$dir/ListItem.pm"; next; } if !defined $item;
+ $item{$dir}={ My::Project::project_arr_to_hash(@$item) };
+ }
+ return %item;
+}
+
1;