diff options
author | Matias Linares <matiaslina@gmail.com> | 2020-09-06 19:51:23 -0300 |
---|---|---|
committer | Matias Linares <matiaslina@gmail.com> | 2020-09-06 19:51:23 -0300 |
commit | ab2a237e5cff43f9b8cd806b7e9e271ffb01b461 (patch) | |
tree | a24c4946fa4e823e079ff72f9d8cd78406a63c38 /scripts | |
parent | e32ac2fe81a3ab4e5532f1a67a5df3c6904aad2b (diff) | |
download | perl6-matrix-client-ab2a237e5cff43f9b8cd806b7e9e271ffb01b461.tar.gz |
Update endpoints script.
Show the total of endpoints implemented at the end
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/load-docs.p6 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/load-docs.p6 b/scripts/load-docs.p6 index 87ef0d4..2392a3a 100755 --- a/scripts/load-docs.p6 +++ b/scripts/load-docs.p6 @@ -34,6 +34,8 @@ sub get-api-docs { sub MAIN(:$spec?) { my %tags = get-api-docs; + my $total = 0; + my $completed = 0; my $implemented-methods = ( Matrix::Client, Matrix::Client::Room, Matrix::Client::MediaStore ).map(*.^methodsĀ».candidates).flat.map( @@ -58,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) } @@ -65,4 +70,11 @@ sub MAIN(:$spec?) { } say ""; } + + say qq:to/EOF/; + + # Endpoint completion + + {$completed/$total}% - ($completed/$total) + EOF } |