Adding a script to autogenerate documentation.

This commit is contained in:
sergiotarxz 2022-03-17 05:08:43 +01:00
parent 3433112546
commit ddf1753c71

View 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 }
);