X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/881b4a69e47004c59f35979620b65fd3d4aaaf16..fe3830a0e28e28ea18335cc81af2faac447fc69a:/mplayer.plp diff --git a/mplayer.plp b/mplayer.plp index 93d1d69..30c72a9 100644 --- a/mplayer.plp +++ b/mplayer.plp @@ -1,52 +1,38 @@ <(common.inc.plp)><: +my $mode = lc($Request || 'mplayer'); +my $include = "$mode.eng"; + +my $info = eval { Data($include) } || {}; +$mode = $info->{title} // $mode; + Html({ - title => 'mplayer cheat sheet', - version => 'v1.1', + title => "\L$mode\E cheat sheet", + version => '1.3', description => [ - "Keyboard cheat sheet for the MPlayer media player,", + "Keyboard cheat sheet for the $mode media player,", "overviewing the default controls." ], - keywords => [qw' - mplayer video media sheet cheat reference overview control shortkey keyboard + keywords => [@{ $info->{keywords} // [] }, qw' + sheet cheat reference overview control shortkey keyboard '], - stylesheet => [qw'light dark circus mono red terse'], + stylesheet => [qw( light dark circus mono red )], keys => 1, + data => ["$include.inc.pl"], }); -:> -

MPlayer cheat sheet

+%{$info} or Abort( + "Requested keyboard $mode not available", + '404 request not found', +); -

index (default)

+say "

$mode cheat sheet

"; +say "

$_

" for $info->{intro} // (); -<: -use Shiar_Sheet::Keyboard 2; -my $info = do 'mplayer.eng.inc.pl' or die $@; -$info->{def} = do 'mplayer.inc.pl'; +use Shiar_Sheet::Keyboard 2.08; +my $info = Data($include); my $keys = Shiar_Sheet::Keyboard->new($info); $keys->map($get{map}) or undef $get{map}; $keys->print_rows($get{rows}, [1,0]); -:> - -
- -
-
-<: $keys->print_legend('legend-types', [qw( ci pm co mi mo me )]) :> -
- -
-<: $keys->print_legend('legend-options', [qw( arg ext )]) :> - - -
-
+$keys->print_legends(\%get);