Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use v6, uncomment mkdir, and show percentage on progress bars
  • Loading branch information
autarch committed Dec 25, 2015
1 parent ca73df5 commit 1500f10
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/DocSite/Generator.pm
@@ -1,3 +1,4 @@
use v6;
unit class DocSite::Generator;

use lib 'lib';
Expand Down Expand Up @@ -148,6 +149,7 @@ sub viz-hints ($group) {

method !process-language-pod {
my $kind = 'Language';

my @files = self!find-pod-files-in($kind);
if $!sparse {
@files = @files[^(@files / $!sparse).ceiling];
Expand Down Expand Up @@ -204,15 +206,15 @@ method !process-one-pod (IO::Path $file, Str $kind) {
method !spurt-html-file (IO::Path $file, Str $kind, Str $html) {
my $dir = IO::Path.new( $*SPEC.catfile( $!root, 'html', $kind.lc ) );
unless $dir ~~ :e {
# $dir.mkdir(0o755);
$dir.mkdir(0o755);
}

IO::Path.new( $*SPEC.catfile( $dir, $file.basename.subst( / '.pod' $ /, '.html' ) ) )
.spurt($html);
}

method !run-with-progress ($items, Routine $sub, Str $msg = q{ done}) {
my $prog = Term::ProgressBar.new( :count( $items.elems ) )
my $prog = Term::ProgressBar.new( :count( $items.elems ), :p )
if $!verbose;

my $supply = $items.Supply;
Expand Down

0 comments on commit 1500f10

Please sign in to comment.