DarcsWeeklyNews/tools/toblog.pl

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env perl

use File::Basename;
use strict;

my $ENTRY=basename($ARGV[0],".page");
while (<STDIN>) {
  s!<h1 !<h3 !g;
  s!</h1!</h3!g;
  print;
  last if (/Patches applied in the last/);
}
print ">";
print 'See <a href="http://wiki.darcs.net/DarcsWeeklyNews/'.$ENTRY.'">darcs wiki entry</a> for details.'