From ab2a237e5cff43f9b8cd806b7e9e271ffb01b461 Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Sun, 6 Sep 2020 19:51:23 -0300 Subject: Update endpoints script. Show the total of endpoints implemented at the end --- scripts/load-docs.p6 | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'scripts') 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 } -- cgit v1.2.3-70-g09d2