X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/6d38d53c6cacbb5dabe6dc663c500d8ef8bb62d0..85197963ca9cdece9448e6549d3759e65168d389:/mplayer.plp
diff --git a/mplayer.plp b/mplayer.plp
index 689ee84..30c72a9 100644
--- a/mplayer.plp
+++ b/mplayer.plp
@@ -1,77 +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
'],
- charset => $sign{charset},
- 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]);
-:>
-
-
-
-
-
-
-
- - osd
-
- Print information or change display.
-
- subtitles
-
- Alter subtitle selection and settings.
-
- video
-
- Video output adjustment.
-
- audio
-
- Sound (track) configuration.
-
- playback
-
- Playback control.
-
- general
-
- Other MPlayer features.
-
-
-
-
-
- - key<:= $sign{arg} :>
-
- Commands with a dot need an argument afterwards.
-
- optional
-
- Some features depend on setup and/or parameters.
-
-
-
- - keyboard map is
- <:= $get{map} ? 'set to ' : '' :><:= $keys->{map} :>
-
- ascii mode is
- <:= defined $sign{-ascii} && 'forced ' :><:=
- $sign{-ascii} ? 'on' : 'off' :>
-
- keys are
- <:= $showkeys ? 'always shown' : 'hidden if unassigned' :><:=
- !exists $get{keys} && ' by default' :>
-
- default style is
- <:= defined $get{style} && 'set to ' :><:= $style :>
-
-
-
+$keys->print_legends(\%get);