Adding a script to autogenerate documentation.
This commit is contained in:
parent
3433112546
commit
ddf1753c71
22
bin/generate_documentation.pl
Normal file
22
bin/generate_documentation.pl
Normal file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use v5.30.0;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Path::Tiny qw/path/;
|
||||
|
||||
my $current_dir = path(__FILE__)->parent->parent->child('lib');
|
||||
|
||||
$current_dir->visit(
|
||||
sub {
|
||||
my ( $path, $state ) = @_;
|
||||
if ( -f $path ) {
|
||||
return if $path !~ /\.pm$/;
|
||||
system mkdir => '-pv', 'doc/' . $path->parent;
|
||||
system pod2html => $path, '-o', 'doc/' . $path . '.html', '--htmldir', $current_dir->child('./doc')->realpath, '--podpath', 'lib', '--recurse';
|
||||
}
|
||||
},
|
||||
{ recurse => 1 }
|
||||
);
|
Loading…
Reference in New Issue
Block a user