[go: up one dir, main page]

Menu

[f66038]: / web / news.pl  Maximize  Restore  History

Download this file

52 lines (45 with data), 1.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/perl -w
# extract from Release notes to produce an html doc news.html
use strict;
use warnings;
sub extract($$) {
my $fic = shift (@_);
my $tout = shift (@_);
my $skip = 1;
open( FIC, '<', $fic ) or die "can not open $fic : $!\n";
while (<FIC>) {
chomp;
if ($skip) {
next unless (m/^release \d/);
$skip = 0;
}
if (m/^release ([\d\.]+)/) {
my $version = $1;
print "<li><a href=\"#v$version\">$version</a></li>\n";
print "<hr />\n";
print "2015-07-03 Eric Gerbier &lt;<a href=\"mailto:gerbier\@users.sourceforge.net\">gerbier\@users.sourceforge.net</a>&gt;<a name=\"v$version\" id=\"v$version\">$version</a>\n";
print "<ul>\n";
} elsif (m/^(\w+)/) {
my $chapter = $1;
print "</ul></li>\n";
print "<li>$chapter<ul>\n";
} elsif (m/^\s*\*\s(.*)/) {
my $change = $1;
print " <li>$change</li>\n";
} elsif ( m/^\*\*\*/ ) {
next;
} elsif (m /^$/) {
next;
} elsif (m/-----------------------------------------------------------------/) {
print "</ul></li>\n";
print "</ul>\n";
last;
} else {
print STDERR "strange line : $_\n";
}
}
close(FIC);
}
my $log = $ARGV[0] || "../src/Release-notes";
my $tout = $ARGV[1]; # if set, will display all file
extract($log, $tout);