[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Introducing RFH and OTH?



Hi.

Several months ago it was proposed (from the RM IIRC) to introduce
new WNPP tags: RFH (request for help) and ITH/OTH (offer to help)

I myself have to take a part of the blame that the discussion
died out since I proposed to technically implement this but it
was first impossible due to the compromise and then forgotten.

After having given the WNPP code a little face lifting I now remembered
my old offer and quickly hacked it together (patch for the WNPP code
attached, missing documentation, other parts of Debian's QA
infrastructure like the PTS should probably be patched, too).
For those who would like to see how this will look:
http://higgs.djpig.de/debian-www/devel/wnpp/
And there the links to
http://higgs.djpig.de/debian-www/devel/wnpp/help
http://higgs.djpig.de/debian-www/devel/wnpp/help_requested
http://higgs.djpig.de/debian-www/devel/wnpp/help_offered

Now, before I complete and commit this and finally announce the
availability of it I wanted to ask for comments again to see if this
"feature" is still wanted and deemed useful.

Gruesse,
-- 
Frank Lichtenheld <djpig@debian.org>
www: http://www.djpig.de/
Index: template/debian/wnpp.wml
===================================================================
RCS file: /cvs/webwml/webwml/english/template/debian/wnpp.wml,v
retrieving revision 1.2
diff -u -r1.2 wnpp.wml
--- template/debian/wnpp.wml	20 Jun 2004 16:56:22 -0000	1.2
+++ template/debian/wnpp.wml	23 Jul 2004 01:37:31 -0000
@@ -24,6 +24,14 @@
 <gettext domain="templates">No Requested packages</gettext>
 </define-tag>
 
+<define-tag norfh whitespace="delete">
+<gettext domain="templates">No help requested</gettext>
+</define-tag>
+
+<define-tag nooth whitespace="delete">
+<gettext domain="templates">No help offered</gettext>
+</define-tag>
+
 
 # define messages for timespans
 # first the ones for being_adopted (ITAs)
@@ -63,6 +71,19 @@
 
 <define-tag req-days>
 <: printf "<gettext domain="templates">requested %s days ago.</gettext>", %0 :>
+</define-tag>
+
+# time spans for help offered (OTHs)
+<define-tag offered-today>
+<gettext domain="templates">offered today.</gettext>
+</define-tag>
+
+<define-tag offered-yesterday>
+<gettext domain="templates">offered yesterday.</gettext>
+</define-tag>
+
+<define-tag offered-days>
+<: printf "<gettext domain="templates">offered %s days ago.</gettext>", %0 :>
 </define-tag>
 
 # define tags for BTS and p.d.o links
Index: devel/wnpp/index.wml
===================================================================
RCS file: /cvs/webwml/webwml/english/devel/wnpp/index.wml,v
retrieving revision 1.24
diff -u -r1.24 index.wml
--- devel/wnpp/index.wml	28 Sep 2003 16:14:51 -0000	1.24
+++ devel/wnpp/index.wml	23 Jul 2004 01:37:31 -0000
@@ -20,11 +20,18 @@
   <li><a href="being_adopted">Packages currently being adopted</a>
 </ul>
 
+<p><a href="help">Packages in need of help</a>:
+<ul>
+  <li><a href="help_requested">Packages, for which help was requested</a>
+  <li><a href="help_offered">Packages, for which help was offered</a>
+</ul>
+
 <p><a href="prospective">Prospective packages</a>:
 <ul>
   <li><a href="being_packaged">Packages being worked on</a>
   <li><a href="requested">Requested packages</a>
 </ul>
+
 
 <p><a href="unable-to-package">Software that can't be packaged</a>
 
Index: devel/wnpp/wnpp.pl
===================================================================
RCS file: /cvs/webwml/webwml/english/devel/wnpp/wnpp.pl,v
retrieving revision 1.31
diff -u -r1.31 wnpp.pl
--- devel/wnpp/wnpp.pl	20 Jun 2004 16:20:30 -0000	1.31
+++ devel/wnpp/wnpp.pl	23 Jul 2004 01:37:31 -0000
@@ -53,10 +53,13 @@
 
 my $curdate = time;
 
-my ( %rfa, %orphaned, %rfabymaint, %rfp, %ita, %itp, %age );
+my ( %rfa, %orphaned, %rfabymaint, %rfp, %ita, %itp, %age,
+     %rfh, %oth );
  ALLPKG: foreach my $entry ($mesg->entries) {
      use integer;
      my $bugid = @{$entry->get('debbugsID')}[0];
+     $bugid =~ s/^#//;
+#     print STDERR "$bugid\n";
      next if @{$entry->get('debbugsState')}[0] eq 'done';
      my $subject = @{$entry->get('debbugsTitle')}[0];
      # If a bug is merged with another, then only consider the youngest
@@ -78,13 +81,18 @@
              push @{$rfabymaint{"Unknown"}}, $bugid;
          }
      } elsif ($subject =~ m/^O:\s*(\S+)(?:\s+-+\s+)?(.*)$/) {
+#	 print STDERR "$bugid\n";
          $orphaned{$bugid} = $1 . ($2?": ":"") . $2;
      } elsif ($subject =~ m/^ITA:(?:\s*(?:ITO|RFA|O|W):)?\s*(\S+)(?:\s+-+\s+)?(.*)$/) {
          $ita{$bugid} = $1 . ($2?": ":"") . $2;
      } elsif ($subject =~ m/^ITP:(?:\s*RFP:)?\s*(.*)/) {
          $itp{$bugid} = join(": ", split(/\s+-+\s+/, $1,2));
      } elsif ($subject =~ m/^RFP:\s*(.*)/) {
-         $rfp{$bugid} = join(": ", split(/\s+-+\s+/, $1,2)); 
+         $rfp{$bugid} = join(": ", split(/\s+-+\s+/, $1,2));
+     } elsif ($subject =~ m/^RFH:\s*(.*)/) {
+         $rfh{$bugid} = join(": ", split(/\s+-+\s+/, $1,2));
+     } elsif ($subject =~ m/^(?:OTH|ITH):\s*(.*)/) {
+         $oth{$bugid} = join(": ", split(/\s+-+\s+/, $1,2));
      } else {
 #         print STDERR "What is this ($bugid): $subject\n" if ( $host ne "klecker.debian.org" );
      }
@@ -94,6 +102,7 @@
 
 my (@rfa_bypackage_html, @rfa_bymaint_html, @orphaned_html);
 my (@being_adopted_html, @being_packaged_html, @requested_html);
+my (@rfh_html, @oth_html);
 
 foreach my $bug (sort { $rfa{$a} cmp $rfa{$b} } keys %rfa) {
     push @rfa_bypackage_html, "\n<li><btsurl bugnr=\"$bug\">$rfa{$bug}</btsurl>";
@@ -126,6 +135,7 @@
 
 foreach my $bug (sort { $ita{$a} cmp $ita{$b} } keys %ita) {
     (my $pkg = $ita{$bug}) =~ s/^(.+):\s+.*$/$1/;
+#    print STDERR "$bug\n";
     push @being_adopted_html, 
          "<li><btsurl bugnr=\"$bug\">$ita{$bug}</btsurl>";
     push @being_adopted_html,
@@ -157,6 +167,32 @@
 }
 if ($#requested_html == -1) { @requested_html = ('<li><norfp /></li>') }
 
+foreach (sort { $rfh{$a} cmp $rfh{$b} } keys %rfh) {
+    (my $pkg = $rfh{$_}) =~ s/^(.+):\s+.*$/$1/;
+    push @rfh_html, 
+         "<li><btsurl bugnr=\"$_\">$rfh{$_}</btsurl>, ";
+    push @rfh_html,
+         " <pdolink \"$pkg\" />, ";
+    if ( $age{$_} == 0 ) { push @rfh_html, '<req-today />' }
+    elsif ( $age{$_} == 1 ) { push @rfh_html, '<req-yesterday />' }
+    else { push @rfh_html, "<req-days \"$age{$_}\" />" };
+    push @rfh_html, "</li>\n";
+}
+if ($#rfh_html == -1) { @rfh_html = ('<li><norfh /></li>') }
+
+foreach (sort { $oth{$a} cmp $oth{$b} } keys %oth) {
+    (my $pkg = $oth{$_}) =~ s/^(.+):\s+.*$/$1/;
+    push @oth_html, 
+         "<li><btsurl bugnr=\"$_\">$oth{$_}</btsurl>, ";
+    push @oth_html,
+         " <pdolink \"$pkg\" />, ";
+    if ( $age{$_} == 0 ) { push @oth_html, '<offered-today />' }
+    elsif ( $age{$_} == 1 ) { push @oth_html, '<offered-yesterday />' }
+    else { push @oth_html, "<offered-days \"$age{$_}\" />" };
+    push @oth_html, "</li>\n";
+}
+if ($#oth_html == -1) { @oth_html = ('<li><nooth /></li>') }
+
 <protect pass="2">
 print "\\#use wml::debian::wnpp\n";
 print "<define-tag rfa_bypackage><ul>@rfa_bypackage_html</ul></define-tag>\n";
@@ -165,6 +201,8 @@
 print "<define-tag being_adopted><ul>@being_adopted_html</ul></define-tag>\n";
 print "<define-tag being_packaged><ul>@being_packaged_html</ul></define-tag>\n";
 print "<define-tag requested><ul>@requested_html</ul></define-tag>\n";
+print "<define-tag help_req><ul>@rfh_html</ul></define-tag>\n";
+print "<define-tag help_offered><ul>@oth_html</ul></define-tag>\n";
 </protect>
 
 </perl>
#use wml::debian::template title="Packages in need of help" GEN_TIME="true"

#include "$(ENGLISHDIR)/devel/wnpp/wnpp.data"

<h3>Packages, for which help was requested</h3>
<help_req />

<h3>Packages, for which help was offered</h3>
<help_offered />
#use wml::debian::template title="Packages, for which help was requested" GEN_TIME="true"

#include "$(ENGLISHDIR)/devel/wnpp/wnpp.data"

<help_req />
#use wml::debian::template title="Packages, for which help was offered" GEN_TIME="true"

#include "$(ENGLISHDIR)/devel/wnpp/wnpp.data"

<help_offered />

Reply to: