X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/e8fdedb133561c65be4adcb3308b58fdd5d9a630..e6f9791973f7c1ef542c3b1438b7fb0527f22109:/cli.plp
diff --git a/cli.plp b/cli.plp
new file mode 100644
index 0000000..d8653e8
--- /dev/null
+++ b/cli.plp
@@ -0,0 +1,61 @@
+<(common.inc.plp)><:
+
+Html({
+ title => 'cli cheat sheet',
+ version => '1.0',
+ description => [],
+ keywords => [qw'
+ '],
+ data => ['data/cli.inc.pl'],
+});
+
+my $cmd = do 'data/cli.inc.pl'
+ or Abort("Error loading program data", 501, $@ // $!);
+:>
+
CLI options
+
+
+<:
+sub showoption {
+ my ($info, $char, $span) = @_;
+ my ($alias, $help) = @{ $info // [] };
+ printf '';
+ $info or return;
+ my ($title) = $alias =~ m{--([\w-]+=?)}
+ or return print $char;
+ $title =~ s/-\K//g;
+ $title =~ s/deref\Kerence/./;
+ print $title;
+}
+
+my @colchars = ('a'..'z', '?');
+print '';
+print qq'' for scalar @colchars;
+#say '';
+for my $section (qw{thead tfoot}) {
+ print "<$section>â³";
+ print ' | ', EscapeHTML($_) for @colchars;
+ say '';
+}
+print ' | ';
+for my $name (sort keys %$cmd) {
+ my $row = $cmd->{$name};
+ print '', $name;
+ showoption($row->{$_}, $_, !$row->{uc $_}) for @colchars;
+ print "\n\t |
---|
";
+ $row->{$_} and showoption($row->{$_}, $_) for map {uc} @colchars;
+}
+say ' ';
+:>
+
+
+
+ supported
+ | unsupported
+ | alias
+ |
+
|