From: Mischa POSLAWSKY Date: Thu, 2 Nov 2023 23:27:09 +0000 (+0100) Subject: mplayer: replace code by keyboard page X-Git-Tag: v1.15~12 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/a75fd4a977d0c23f72a3cd4e8ca38eeb31d4cb17 mplayer: replace code by keyboard page Identical results. --- diff --git a/mplayer.eng.inc.pl b/mplayer.eng.inc.pl index 90f3507..9568ed8 100644 --- a/mplayer.eng.inc.pl +++ b/mplayer.eng.inc.pl @@ -2,11 +2,17 @@ use utf8; { title => 'MPlayer', +version => '1.3', intro => join("\n", 'Default interface controls for the original MPlayer v1.0 media player.', 'Mostly inherited by mpv.', ), +description => [ + "Keyboard cheat sheet for the $mode media player,", + "overviewing the default controls.", +], keywords => [qw'mpv mplayer mplayer2 media player video audio'], +rows => [1, 0], key => { '[' => "slow down 10%", diff --git a/mplayer.plp b/mplayer.plp index 30c72a9..161be98 100644 --- a/mplayer.plp +++ b/mplayer.plp @@ -1,38 +1,3 @@ <(common.inc.plp)><: - -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.3', - description => [ - "Keyboard cheat sheet for the $mode media player,", - "overviewing the default controls." - ], - keywords => [@{ $info->{keywords} // [] }, qw' - sheet cheat reference overview control shortkey keyboard - '], - stylesheet => [qw( light dark circus mono red )], - keys => 1, - data => ["$include.inc.pl"], -}); - -%{$info} or Abort( - "Requested keyboard $mode not available", - '404 request not found', -); - -say "

$mode cheat sheet

"; -say "

$_

" for $info->{intro} // (); - -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_legends(\%get); - +$Request ||= 'mplayer'; +include 'keyboard.plp'; diff --git a/mpv.eng.inc.pl b/mpv.eng.inc.pl index e3e770d..67847ff 100644 --- a/mpv.eng.inc.pl +++ b/mpv.eng.inc.pl @@ -4,11 +4,13 @@ my $legacy = do 'mplayer.eng.inc.pl' or die $@; { title => 'mpv', +version => '1.3', intro => join("\n", 'Default interface controls for version 0.35 of the mpv media player.', 'Differences from the original MPlayer are indicated.', ), keywords => $legacy->{keywords}, +rows => [1, 0], key => { %{ $legacy->{key} }, ',' => "step backward<>s",