Skip to content

Commit 3274031

Browse files
committed
script for making HTML files
very basic and very much a work in progress
1 parent 0ba2375 commit 3274031

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

htmlify.pl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env perl6
2+
use v6;
3+
4+
# this script isn't in bin/ because it's not meant
5+
# to be installed.
6+
7+
sub MAIN($out_dir = 'html') {
8+
mkdir $out_dir unless $out_dir.IO ~~ :e;
9+
10+
# TODO: be recursive instead
11+
my @source = dir('lib').grep(*.f).grep(rx{\.pod$});
12+
13+
for (@source) {
14+
my $podname = .basename.subst(rx{\.pod$}, '').subst(:g, '/', '::');
15+
say "$_.path() => $podname";
16+
shell("perl6 --doc=HTML $_.path() > $out_dir/$podname.html");
17+
}
18+
}

0 commit comments

Comments
 (0)