doc/share/xml/man-refs.pl

12 lines
310 B
Perl
Raw Normal View History

#!/usr/bin/perl -w
# $FreeBSD$
use strict;
while (<>) {
next unless (m,^(.*/)([\w\._-]+)\.(\d\w*)(\.gz)?$,);
my ($entity, $page, $volume) = ($2, $2, $3);
$entity =~ y/_/./;
print "<!ENTITY man.$entity.$volume \"<citerefentry/<refentrytitle/$page/<manvolnum/$volume//\">\n";
}