diff options
Diffstat (limited to 'scripts/load-docs.p6')
-rwxr-xr-x | scripts/load-docs.p6 | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/scripts/load-docs.p6 b/scripts/load-docs.p6 index b20dd86..2392a3a 100755 --- a/scripts/load-docs.p6 +++ b/scripts/load-docs.p6 @@ -34,8 +34,11 @@ sub get-api-docs { sub MAIN(:$spec?) { my %tags = get-api-docs; - my $implemented-methods = (Matrix::Client, Matrix::Client::Room).map(*.^methods) - .flat.map( + my $total = 0; + my $completed = 0; + my $implemented-methods = ( + Matrix::Client, Matrix::Client::Room, Matrix::Client::MediaStore + ).map(*.^methodsĀ».candidates).flat.map( { quietly try { .WHY.Str } or "" }).grep(/_matrix/).SetHash; @@ -57,6 +60,9 @@ sub MAIN(:$spec?) { for $methods.Seq.sort -> $m { my Str $method = $m.trim; my $checked = $implemented-methods{$m} ?? "X" !! " "; + $completed++ if $implemented-methods{$m}; + $total++; + if $spec { $method = $m.subst(/unstable/, $spec) } @@ -64,4 +70,11 @@ sub MAIN(:$spec?) { } say ""; } + + say qq:to/EOF/; + + # Endpoint completion + + {$completed/$total}% - ($completed/$total) + EOF } |