Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
script for making HTML files
very basic and very much a work in progress
  • Loading branch information
moritz committed Jul 2, 2012
1 parent 0ba2375 commit 3274031
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions htmlify.pl
@@ -0,0 +1,18 @@
#!/usr/bin/env perl6
use v6;

# this script isn't in bin/ because it's not meant
# to be installed.

sub MAIN($out_dir = 'html') {
mkdir $out_dir unless $out_dir.IO ~~ :e;

# TODO: be recursive instead
my @source = dir('lib').grep(*.f).grep(rx{\.pod$});

for (@source) {
my $podname = .basename.subst(rx{\.pod$}, '').subst(:g, '/', '::');
say "$_.path() => $podname";
shell("perl6 --doc=HTML $_.path() > $out_dir/$podname.html");
}
}

0 comments on commit 3274031

Please sign in to comment.