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

Re: Bug log ordering

Ian Jackson <ijackson@chiark.greenend.org.uk> wrote:
> Raul: thanks for your suggestion wrt CGI scripts.  I don't really want
> to make such heavy use of CGI scripts because it would make it much
> harder to run mirrors of the bug system.  At the moment the bug system
> is just a pile of files which you can put in a webserver.

The cgi script wouldn't have to run on the same system.  It's
a pretty simple script (see below), just change input mechanism
from <> to something based on use CGI;


#!/usr/bin/perl -w

=head1 NAME

reversebug - quick hack to reverse displayed order of bug reports from default.


reversebug <before >after
reversebug before >after

[intended for eventual use in cgi-bin, but not quite yet]


transforms auto-generated text -- such as is currently generated by
Debian's bug report system -- from reverse chrono order to regular
chrono order.  Is not likely to do anything to other text.

If used in a cgi context this code should be changed to modify links
such that they point through the cgi mechanism.  Change the synopsis
when you do this.


while (<>) {
	#... s-http://www.debian.org/Bugs/db/-/cgi-bin/reversebug?-g;
	if (m-<h2>Message received at \S+\@bugs.debian.org:</h2><br>-
		or m-<address>-) {
		$part[++$num].= $_;
	} else {
		$part[$num].= $_;

print $part[0];
for ($i=$num-1; $i>0; $i--) {
	print $part[$i];
print $part[$num];

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: