-
Notifications
You must be signed in to change notification settings - Fork 1
/
mkmanpage
executable file
·47 lines (42 loc) · 820 Bytes
/
mkmanpage
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/perl
use Getopt::Long;
use POSIX qw(strftime);
sub usage()
{
print STDERR "mkmanpage -n <name>\n";
die;
}
#
# 1) process the arguments
#
GetOptions("n=s" => \$manname);
if( !$manname ) { usage(); }
$date = strftime "%e %b %Y", gmtime();
print "<REFENTRY ID=\"".$manname."-1\"> <REFMETA>
<REFENTRYTITLE>".$manname."</REFENTRYTITLE>
<REFMISCINFO>What Section??</REFMISCINFO>
</REFMETA>
<REFNAMEDIV>
<REFNAME>".$manname;
print "</REFNAME>
<REFPURPOSE>What is this?
</REFPURPOSE>
</REFNAMEDIV>
<REFSYNOPSISDIV>
<REFSYNOPSISDIVINFO>
<DATE>".$date."</DATE>
</REFSYNOPSISDIVINFO>
<SYNOPSIS>";
print "return_type ".$manname."(parameters)";
print " </SYNOPSIS>
</REFSYNOPSISDIV>
<REFSECT1>
<REFSECT1INFO>
<DATE>".$date."</DATE>
</REFSECT1INFO>
<TITLE>Description
</TITLE>
<PARA>
</PARA>
</REFSECT1>
</REFENTRY>";