Perl script that translates a list of man pages to a list of SGML entity

definitions.
This commit is contained in:
Dag-Erling Smørgrav 2002-06-07 13:16:50 +00:00
parent ba497fd8ed
commit 31f658b724
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=13320

11
share/sgml/man-refs.pl Normal file
View file

@ -0,0 +1,11 @@
#!/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";
}