aboutsummaryrefslogtreecommitdiff
path: root/scripts/load-docs.p6
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/load-docs.p6')
-rwxr-xr-xscripts/load-docs.p612
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
}