summaryrefslogtreecommitdiff
path: root/docs/docbook/scripts/make-article.pl
blob: d1f8c668326f64b6dda63d2eb889732b5a3bbe66 (plain)
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
#!/usr/bin/perl

$ignore = 0;

print "<!DOCTYPE article PUBLIC \"-//OASIS//DTD DocBook V4.1//EN\">\n";

while (<STDIN>) {

	$_ =~ s/<chapter/<article/g;
	$_ =~ s/<\/chapter/<\/article/g;

	if ( $_ =~ '<articleinfo>') {
		$ignore = 1;
	}

	if ( $_ =~ '</articleinfo>') {
		$ignore = 0;
		$_ = "";
	}


	if (! $ignore) { print "$_"; }


}