X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/a552717b456a77062808b59fbecfe58a5d4e84df..89cc73c8a0ee71ed9e85cbb7fcbf7e9e53fb1713:/shell.plp?ds=sidebyside diff --git a/shell.plp b/shell.plp index 85ababa..75ea57e 100644 --- a/shell.plp +++ b/shell.plp @@ -10,7 +10,7 @@ Html({ say "
feature', (map { - sprintf(' | %s', Entity($_->{name})) - } @{ $data->{agents} }{@agents}), + sprintf(' | %s', + (map { + sprintf ' title="%s"', Entity($_) + } $data->{agents}->{$_}->{name} // ()), + $_ + ) + } @agents), ); print '', $header; say ''; @@ -34,32 +39,36 @@ sub saytitlecol { print ' | ', Entity($row->{title}); } -my %DSTATS = ( - Y => 'feature can be done', - N => 'feature is not present', - F => 'feature can only be done by using the shells function mechanism', - L => 'the readline library must be linked into the shell to enable this feature', -); -my %CSTATS = ( - N => 'l1', - F => 'l2', - L => 'l4', - Y => 'l5', +my %TSTATS = ( + l5 => 'â', + l4 => 'â', + l3 => '±', + l2 => '*', + l1 => 'â', ); sub saysupportcols { my ($row, $agent) = @_; - my $stat = $row->{support}->{$agent}; + my $support = $row->{support}->{$agent}; + my $level = ( + !defined $support ? 'l1' : + ref $support ne 'HASH' ? 'l0' : + $support->{alt} ? 'l2' : + $support->{partial} ? 'l3' : + $support->{optional} ? 'l4' : + 'l5' + ); my $title = join(' ', - $DSTATS{$stat} // 'unknown support', - 'in', $agent, + defined $support ? 'supported' : 'unsupported', + 'in', $data->{agents}->{$agent}->{abbr} // $agent, ); + $title .= " ($_)" + for ref $support && ($support->{note} // $support->{optional}) || (); + my $header = defined $support ? 'â' : 'â'; printf(' | %s', - join(' ', - X => $CSTATS{$stat}, - ), + join(' ', X => $level), $title, - $stat, + $TSTATS{$level} // (ref $support ? '?' : $support), ); } |
---|