git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mplayer: link mpv subpage, distinguish metadata
[sheet.git]
/
mplayer.plp
diff --git
a/mplayer.plp
b/mplayer.plp
index 9e97d71837886f00bde14b35f4ded7342e0a9e45..30c72a9bab57434ccce535198eea80601059b4c0 100644
(file)
--- a/
mplayer.plp
+++ b/
mplayer.plp
@@
-1,17
+1,19
@@
<(common.inc.plp)><:
<(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",
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."
],
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 )],
sheet cheat reference overview control shortkey keyboard
'],
stylesheet => [qw( light dark circus mono red )],
@@
-19,8
+21,13
@@
Html({
data => ["$include.inc.pl"],
});
data => ["$include.inc.pl"],
});
+%{$info} or Abort(
+ "Requested keyboard <q>$mode</q> not available",
+ '404 request not found',
+);
+
say "<h1>$mode cheat sheet</h1>";
say "<h1>$mode cheat sheet</h1>";
-say
''
;
+say
"<p>$_</p>" for $info->{intro} // ()
;
use Shiar_Sheet::Keyboard 2.08;
my $info = Data($include);
use Shiar_Sheet::Keyboard 2.08;
my $info = Data($include);