X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/254f395a864dea55080e1ce4f9f0f3dab55af475..1d4192ba208911f914e0c6fefaf9a15946d12c98:/mplayer.plp?ds=inline
diff --git a/mplayer.plp b/mplayer.plp
index 9e97d71..30c72a9 100644
--- a/mplayer.plp
+++ b/mplayer.plp
@@ -1,17 +1,19 @@
<(common.inc.plp)><:
-my $mode = $Request eq 'mpv' ? $Request : 'MPlayer';
-my $include = "\L$mode.eng";
+my $mode = lc($Request || 'mplayer');
+my $include = "$mode.eng";
+
+my $info = eval { Data($include) } || {};
+$mode = $info->{title} // $mode;
Html({
title => "\L$mode\E cheat sheet",
- version => '1.2',
+ version => '1.3',
description => [
"Keyboard cheat sheet for the $mode media player,",
"overviewing the default controls."
],
- keywords => [qw'
- mpv mplayer mplayer2 media player video audio
+ keywords => [@{ $info->{keywords} // [] }, qw'
sheet cheat reference overview control shortkey keyboard
'],
stylesheet => [qw( light dark circus mono red )],
@@ -19,8 +21,13 @@ Html({
data => ["$include.inc.pl"],
});
+%{$info} or Abort(
+ "Requested keyboard $mode
not available",
+ '404 request not found',
+);
+
say "
$_
" for $info->{intro} // (); use Shiar_Sheet::Keyboard 2.08; my $info = Data($include);