[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gfsd]Recent packages
From: |
Matt Kraai |
Subject: |
Re: [gfsd]Recent packages |
Date: |
Wed, 9 May 2001 11:45:30 -0600 |
User-agent: |
Mutt/1.2.5i |
On Wed, May 09, 2001 at 01:06:10PM -0400, Janet Casey wrote:
> On Wed, May 09, 2001 at 12:46:08PM -0400, Janet Casey wrote:
> > I noticed that the "recent packages" link on the directory is not
> > being updated- the most recent listing is in March, and lots of
> > packages have been committed since then. Do we Kknow why this is?
>
> Yes. It relies on the %%version field having a certain format:
>
> %%version: <version_number> released on <iso-date>
>
> For instance,
>
> %%version: apache released on 2001-01-29
>
> Can this be changed? Otherwise it means having to change the date
> style in almost all of the packages. Is it a complicated process to
> change it so that the version field takes a) any date format, which
> would be ideal or b) the 09 May 2001 format, which is what almost all
> of the packages are written in.
How about we change all the dates to be in ISO format? I've
appended a script to do so.
Matt
#!/usr/bin/perl
%months = ( "Jan" => "01", "Feb" => "02", "Mar" => "03", "Apr" => "04",
"May" => "05", "Jun" => "06", "Jul" => "07", "Aug" => "08", "Sep" => "09",
"Oct" => "10", "Nov" => "11", "Dec" => "12" );
$months = "Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec";
for $file (@ARGV) {
open FILE, $file;
open OUTFILE, ">$file.new";
while (<FILE>) {
s/(\d\d) ($months) (\d\d\d\d)/$3-$months{$2}-$1/g;
print OUTFILE;
}
close OUTFILE;
close FILE;
rename ("$file.new", $file);
}