1
+ use Term::ProgressBar;
2
+
1
3
use lib 'lib';
2
4
3
5
task 'default' => 'htmlify';
@@ -43,7 +45,6 @@ task 'ctest', { run-tests(<t/07-tabs.t xt/perl-nbsp.t xt/trailing-whitespace.t>)
43
45
44
46
#| Generate type graph images
45
47
task 'type-graph-images', {
46
- say "Generating type-graph images";
47
48
use Perl6::TypeGraph;
48
49
use Perl6::TypeGraph::Viz;
49
50
@@ -91,17 +92,19 @@ task 'type-graph-images', {
91
92
my $type-graph = Perl6::TypeGraph.new-from-file('type-graph.txt');
92
93
my $infile-time = 'type-graph.txt'.IO.modified;
93
94
95
+ my $bar = Term::ProgressBar.new( count => +$type-graph.sorted, :p, :name<type-graph images>);
96
+ my $count = 1;
97
+
94
98
#| Writing type graph images
95
99
for $type-graph.sorted -> $type {
96
100
my $outfile = "html/images/type-graph-{$type}.svg";
97
101
my $outfile-time = try $outfile.IO.modified // 0;
98
102
103
+ $bar.update($count++);
104
+
99
105
if $outfile-time < $infile-time {
100
106
my $viz = Perl6::TypeGraph::Viz.new-for-type($type);
101
107
push @jobs, $viz.to-file($outfile, format => 'svg');
102
- print '.';
103
- } else {
104
- print '#';
105
108
}
106
109
}
107
110
@@ -110,17 +113,20 @@ task 'type-graph-images', {
110
113
%by-group<Exception>.append: $type-graph.types< Exception Any Mu >;
111
114
%by-group<Metamodel>.append: $type-graph.types< Any Mu >;
112
115
116
+ $bar = Term::ProgressBar.new( count => +%by-group.keys, :p, :name<specialized images>);
117
+ $count = 1;
118
+
113
119
for %by-group.kv -> $group, @types {
114
120
my $outfile = "html/images/type-graph-{$group}.svg";
115
121
my $outfile-time = try $outfile.IO.modified // 0;
122
+
123
+ $bar.update($count++);
124
+
116
125
if $outfile-time < $infile-time {
117
126
my $viz = Perl6::TypeGraph::Viz.new(:types(@types),
118
127
:dot-hints(viz-hints($group)),
119
128
:rank-dir('LR'));
120
129
push @jobs, $viz.to-file($outfile, format => 'svg');
121
- print '.';
122
- } else {
123
- print '#';
124
130
}
125
131
}
126
132
say '';
0 commit comments