写个脚本转换大量的pod文档
时间:2006-04-20 来源:coldrainsunc
openssl中的文档是pod的,一个个的转太麻烦了
openssl-0.9.8a/doc/apps下
asn1parse.pod dsaparam.pod html pod2htmd.x~~ speed.pod
CA.pl.pod dsa.pod mv.pl pod2htmi.x~~ spkac.pod
ca.pod ecparam.pod nseq.pod rand.pod s_server.pod
ciphers.pod ec.pod ocsp.pod req.pod s_time.pod
config.pod enc.pod openssl.pod rsa.pod verify.pod
crl2pkcs7.pod errstr.pod passwd.pod rsautl.pod version.pod
crl.pod gendsa.pod pkcs12.pod s_client.pod x509.pod
dgst.pod genrsa.pod pkcs7.pod sess_id.pod x509v3_config.pod
dhparam.pod hello.sh pkcs8.pod smime.pod
脚本mv.pl:
#!/usr/bin/perl -w
use strict;
my @args=@ARGV;
mkdir "html";
foreach my $util (@args)
{
my $end=$util;
$end =~ s/\.pod//;
$end=${end}.".html";
`pod2html $util >$end;mv $end "html"`;
}
运行:
ls |xargs ./mv.pl
这样,在html目录下就生成了html文档了!
openssl-0.9.8a/doc/apps下
asn1parse.pod dsaparam.pod html pod2htmd.x~~ speed.pod
CA.pl.pod dsa.pod mv.pl pod2htmi.x~~ spkac.pod
ca.pod ecparam.pod nseq.pod rand.pod s_server.pod
ciphers.pod ec.pod ocsp.pod req.pod s_time.pod
config.pod enc.pod openssl.pod rsa.pod verify.pod
crl2pkcs7.pod errstr.pod passwd.pod rsautl.pod version.pod
crl.pod gendsa.pod pkcs12.pod s_client.pod x509.pod
dgst.pod genrsa.pod pkcs7.pod sess_id.pod x509v3_config.pod
dhparam.pod hello.sh pkcs8.pod smime.pod
脚本mv.pl:
#!/usr/bin/perl -w
use strict;
my @args=@ARGV;
mkdir "html";
foreach my $util (@args)
{
my $end=$util;
$end =~ s/\.pod//;
$end=${end}.".html";
`pod2html $util >$end;mv $end "html"`;
}
运行:
ls |xargs ./mv.pl
这样,在html目录下就生成了html文档了!
相关阅读 更多 +
排行榜 更多 +