boxes/doc/create_changelog.pl

165 lines
3.8 KiB
Perl
Raw Normal View History

1999-07-12 14:28:46 +02:00
#!/local/bin/perl5 -w
#
# Author: Thomas Jensen <tsjensen@stud.informatik.uni-erlangen.de>
# Date created: July 12, 1999 (Monday, 13:14h)
# Language: Perl 5
# Version: $Id: create_changelog.pl,v 1.1 1999/07/12 12:28:46 tsjensen Exp tsjensen $
#
# History:
#
# $Log: create_changelog.pl,v $
# Revision 1.1 1999/07/12 12:28:46 tsjensen
# Initial revision
#______________________________________________________________________________
#==============================================================================
1999-07-12 14:28:46 +02:00
@files = @ARGV;
$#files >= 0 or die "no input files";
print '<HTML>
<HEAD>
<TITLE>boxes - Change Log</TITLE>
1999-07-12 14:28:46 +02:00
<META NAME="Author" CONTENT="Thomas Jensen">
<META HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=iso-8859-1">
<META NAME="Robots" CONTENT="index,follow">
</HEAD>
<BODY TEXT="#000000" LINK="#0000FF" VLINK="#C00080" BGCOLOR="#FFFFFF">
This page is an automatically generated chronologically sorted change log of
the files listed <A HREF="#flist">below</A>.
1999-07-12 14:28:46 +02:00
<H1>Chronological Change Log</H1>
1999-07-12 14:28:46 +02:00
<DL>
';
%cl = ();
foreach $dat (sort @files) {
@tmp = `rlog $dat`;
$start = 0;
$rev = "";
$auth = "";
$datum = "";
@desc = ();
for ($i=0; $i<=$#tmp; ++$i) {
if ($start == 0) {
next unless $tmp[$i] =~ /^----------------------------$/;
$start = 1;
next;
}
if ($tmp[$i] =~ /^date: ([^;]*);/) {
$datum = $1;
}
if ($tmp[$i] =~ /^revision ([0-9]\.[0-9]+)/) {
$rev = $1;
}
if ($tmp[$i] =~ /author: ([^;]*);/) {
$auth = $1;
}
if ($tmp[$i] !~ /^revision ([0-9]\.[0-9]+)/
&& $tmp[$i] !~ /^date: ([^;]*);/) {
$tmp[$i] =~ s/</\&lt;/g;
$tmp[$i] =~ s/>/\&gt;/g;
$tmp[$i] =~ s/<2F>/\&uuml;/g;
$tmp[$i] =~ s/<2F>/\&ouml;/g;
$tmp[$i] =~ s/<2F>/\&auml;/g;
$tmp[$i] =~ s/<2F>/\&Uuml;/g;
$tmp[$i] =~ s/<2F>/\&Ouml;/g;
$tmp[$i] =~ s/<2F>/\&Auml;/g;
$tmp[$i] =~ s/<2F>/\&szlig;/g;
$tmp[$i] =~ s/"/\&quot;/g;
chop $tmp[$i];
if ($tmp[$i] =~ /^Initial revision$/) {
$tmp[$i] = "<FONT COLOR=\"#C00000\">".$tmp[$i]."</FONT>";
}
if (@desc > 0 && $tmp[$i] !~ /^[a-z<><7A><EFBFBD>]/ && $tmp[$i] !~ /^[-=]{10}/) {
$tmp[$i] = "<BR>".$tmp[$i];
}
push @desc, $tmp[$i]."\n";
1999-07-12 14:28:46 +02:00
}
if ($tmp[$i] =~ /^----------------------------$/
|| $tmp[$i] =~ /^===============================================/)
{
$desc[$#desc] = "";
$cl{$datum."; <STRONG>".$dat." ".$rev."</STRONG> (".$auth.")"} = [ @desc ];
1999-07-12 14:28:46 +02:00
@desc = ();
}
}
}
foreach $line (reverse sort keys %cl) {
print "<DT><TT>$line</TT>\n";
print "<DD><TT>", @{$cl{$line}}, "</TT><P>\n\n";
}
print '</DL>
<HR>
<H2><A NAME="flist">List of Files</A></H2>
<DL>
';
foreach $dat (sort @files) {
next unless -r $dat;
@tmp = `rlog $dat`;
@foo = ();
$start = 0;
@desc = ();
@foo = grep /^head: /, @tmp;
$rev = $foo[0];
$rev =~ s/^head: //;
chop $rev;
for ($i=0; $i<$#tmp; ++$i) {
if ($start) {
if ($start == 2) {
last;
}
else {
if ($tmp[$i] =~ /^----------------------------$/) {
$start = 2;
}
else {
push @desc, $tmp[$i];
}
}
}
else {
$start = 1 if ($tmp[$i] =~ /^description:$/);
}
}
print "<DT><TT>$dat</TT> <i>($rev)</i>\n";
print "<DD>", @desc;
}
print '</DL>
<!--#include file="footer.inc.html" -->
1999-07-12 14:28:46 +02:00
</BODY>
</HTML>
';
#EOF vim: set sw=4: