diff options
author | Matias Linares <matiaslina@gmail.com> | 2020-12-27 12:19:17 -0300 |
---|---|---|
committer | Matias Linares <matiaslina@gmail.com> | 2020-12-27 12:19:17 -0300 |
commit | 6883348dafc0e6c58a5478074221f8cca7859716 (patch) | |
tree | 8dd8db05b0f31f2bf3aef81426758b2b658e9f7f /scripts/load-docs.p6 | |
parent | e1abad7a57fd34ffb55c1d57d0b89ee91e55296b (diff) | |
parent | f1d1a526cc4950578e8769fe3c94147777466531 (diff) | |
download | perl6-matrix-client-6883348dafc0e6c58a5478074221f8cca7859716.tar.gz |
Merge branch 'master' into documentation
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 } |