Perl script that translates a list of man pages to a list of SGML entity
definitions.
This commit is contained in:
parent
ba497fd8ed
commit
31f658b724
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=13320
1 changed files with 11 additions and 0 deletions
11
share/sgml/man-refs.pl
Normal file
11
share/sgml/man-refs.pl
Normal 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";
|
||||
}
|
Loading…
Reference in a new issue