keyboard: replace all similar pages
authorMischa POSLAWSKY <perl@shiar.org>
Thu, 2 Nov 2023 23:26:46 +0000 (00:26 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 8 Nov 2023 00:00:54 +0000 (01:00 +0100)
Add metadata for identical results as subpages.
Do not relocate existing pages yet though.

13 files changed:
less.eng.inc.pl
less.plp
mplayer.plp
mutt.eng.inc.pl
mutt.plp
nethack.eng.inc.pl
nethack.plp
screen.eng.inc.pl
screen.plp
vi.eng.inc.pl
vi.plp
vimperator.eng.inc.pl
vimperator.plp

index fed0bd26174638a24d3c9aa88bd100e5c55e2ade..9000189d42a76152cb675cc93e155b9f068d55a8 100644 (file)
@@ -2,6 +2,14 @@ use utf8;
 
 {
 # less v418
+title => 'Less',
+version => '1.1',
+description => [
+       "Default bindings of the less pager.",
+       "Clearly shows how much it's more than more.",
+],
+keywords => [qw' less keys pager more options '],
+rows => [1, 0],
 
 key => {
        "\e"=> "alt<>/meta",
index e40d37c4fa1ed9af98253aae768131ef437baa65..ef99eb35db9a8038e16e08107b344b9f61d182ee 100644 (file)
--- a/less.plp
+++ b/less.plp
@@ -1,30 +1,3 @@
-<(common.inc.plp)><:
-
-Html({
-       title => 'less cheat sheet',
-       version => '1.1',
-       description => [
-               "Default bindings of the less pager.",
-               "Clearly shows how much it's more than more.",
-       ],
-       keywords => [qw'
-               less sheet cheat keys pager more
-               shortkey reference keyboard commands options overview
-       '],
-       stylesheet => [qw( light dark circus mono red )],
-       keys => 1,
-});
-
-:>
-<h1>Less cheat sheet</h1>
-
-<h2>normal pager (default)</h2>
-
 <:
-use Shiar_Sheet::Keyboard 2.07;
-my $info = Data('less.eng');
-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 = 'less';
+Include 'keyboard.plp';
index 161be989c49237e34749a41482484a54d695b3c5..013f7dfa3fa90c2e752dc940b3ee17cfb0d21b42 100644 (file)
@@ -1,3 +1,3 @@
-<(common.inc.plp)><:
-$Request ||= 'mplayer';
-include 'keyboard.plp';
+<:
+$Request = $ENV{PATH_INFO} eq '/mpv' ? 'mpv' : 'mplayer';
+Include 'keyboard.plp';
index 2c58283b654e100c4f0d416aacb742c1877e4e9a..0cf57e27146a5959a78cef7f9f317d806f2c8511 100644 (file)
@@ -59,6 +59,14 @@ my %commondef = (
 );
 
 {
+title => 'Mutt',
+version => '1.2',
+description => [
+       "Cheat sheet for the Mutt e-mail client,",
+       "showing the default binding for each key.",
+],
+keywords => [qw' mutt MUA email client '],
+
 key => {
        %commonkey,
 
index 09918eee11f6b4389d9c709b19813f598fddf5b6..57f1f13f60214a4f4d06541631e63d877e1a1f41 100644 (file)
--- a/mutt.plp
+++ b/mutt.plp
@@ -1,29 +1,3 @@
-<(common.inc.plp)><:
-
-Html({
-       title => 'mutt cheat sheet',
-       version => '1.2',
-       description => [
-               "Cheat sheet for the Mutt e-mail client,",
-               "showing the default binding for each key.",
-       ],
-       keywords => [qw'
-               mutt MUA email client sheet cheat reference overview commands keyboard
-       '],
-       stylesheet => [qw( light dark circus mono red )],
-       keys => 1,
-});
-
-:>
-<h1>Mutt cheat sheet</h1>
-
-<h2>index (default)</h2>
-
 <:
-use Shiar_Sheet::Keyboard 2;
-my $info = Data('mutt.eng');
-my $keys = Shiar_Sheet::Keyboard->new($info);
-$keys->map($get{map}) or undef $get{map};
-$keys->print_rows($get{rows});
-$keys->print_legends(\%get);
-
+$Request = 'mutt';
+Include 'keyboard.plp';
index e54a6390a097ab0f7420c28e8bb030fe25c77d08..af32fe4352e230e085372b1cf50d47e26e636908 100644 (file)
@@ -1,6 +1,15 @@
 use utf8;
 
 {
+title => 'NetHack',
+version => '1.1',
+description => [
+       "Keyboard overview sheet for the Nethack console RPG game,",
+       "describing the default controls.",
+],
+keywords => [qw' nethack rogue game controls '],
+rows => [3, 2, 1, 0],
+
 key => {
        'b' =>   "step left down\nnumpad 1",
        'j' =>        "step down\nnumpad 2",
index 5e676d9e87fef097c2b4224a47de1802a6d0c369..474fa107d613b4539c65d12a4dc29d1054c89e55 100644 (file)
@@ -1,31 +1,4 @@
-<(common.inc.plp)><:
-
-Html({
-       title => 'nethack cheat sheet',
-       version => '1.1',
-       description => [
-               "Keyboard overview sheet for the Nethack console RPG game,",
-               "describing the default controls.",
-       ],
-       keywords => [qw'
-               nethack rogue game control controls sheet reference overview keyboard
-       '],
-       stylesheet => [qw( light dark circus mono red )],
-       keys => 1,
-});
-
-:>
-<h1>NetHack cheat sheet</h1>
-
-<h2>normal gameplay</h2>
-
 <:
-use Shiar_Sheet::Keyboard 2;
-my $info = Data('nethack.eng');
-my $keys = Shiar_Sheet::Keyboard->new($info);
-$_->{"\e"} = ['me mode'] for values %{ $info->{def} };
-       # static reset button, even though it's not (officially) in the game
-$keys->map($get{map}) or undef $get{map};
-$keys->print_rows($get{rows} || '4321-421', [3,2,1,0]);
-$keys->print_legends(\%get);
-
+$Request = 'nethack';
+$get{rows} ||= '4321-421';
+Include 'keyboard.plp';
index 7198b250014f67165a652c4101bbccac48b8530d..f1ad1b37afbc5b8fa70883c8fe6a8fadbcc6cdbb 100644 (file)
@@ -2,6 +2,13 @@ use utf8;
 
 {
 # screen version 4.00.03jw4
+title => 'Screen',
+version => '1.1',
+description => [
+       "Interactive cheat sheet for the Screen terminal manager,",
+       "describing the function of each key.",
+],
+keywords => [qw' screen terminal window manager '],
 
 key => {
        'a' => "literal a",
index 3e61f0b967c9e7744e38940bbc62e06b417e268d..1223a5abdd08dc8fed510bdb26227aa65b1e41cf 100644 (file)
@@ -1,30 +1,3 @@
-<(common.inc.plp)><:
-
-Html({
-       title => 'screen cheat sheet',
-       version => '1.1',
-       description => [
-               "Interactive cheat sheet for the Screen terminal manager,",
-               "describing the function of each key.",
-       ],
-       keywords => [qw'
-               screen sheet cheat reference overview commands keyboard
-               terminal window manager
-       '],
-       stylesheet => [qw( light dark circus mono red )],
-       keys => 1,
-});
-
-:>
-<h1>Screen cheat sheet</h1>
-
-<h2>normal mode (default)</h2>
-
 <:
-use Shiar_Sheet::Keyboard 2;
-my $info = Data('screen.eng');
-my $keys = Shiar_Sheet::Keyboard->new($info);
-$keys->map($get{map}) or undef $get{map};
-$keys->print_rows($get{rows});
-$keys->print_legends(\%get);
-
+$Request = 'screen';
+Include 'keyboard.plp';
index 6188702d1406070c6da250d8d17206595d4caae2..58ac2f39d37e0b7a458c4aac0d7ceeec170a453f 100644 (file)
@@ -7,6 +7,14 @@ my @motions = qw(
 );
 
 {
+title => 'vi/vim',
+version => 1.5,
+description => [
+       "Interactive cheat sheet for vi text editors, notably Vim,",
+       "describing each key in various modes.",
+],
+keywords => [qw' vi vim nvi '],
+
 key => {
 
        "\e"=> "normal mode",
diff --git a/vi.plp b/vi.plp
index bd30d8cf19c3d0c1f228aea855f36bc4231aab3c..669f428ec7e4bb8d1ac5dc05b88e316dfe15da25 100644 (file)
--- a/vi.plp
+++ b/vi.plp
@@ -1,29 +1,3 @@
-<(common.inc.plp)><:
-
-Html({
-       title => 'vi cheat sheet',
-       version => '1.5',
-       description => [
-               "Interactive cheat sheet for vi text editors, notably Vim,",
-               "describing each key in various modes.",
-       ],
-       keywords => [qw'
-               vi vim nvi sheet cheat reference overview commands keyboard
-       '],
-       stylesheet => [qw( light dark circus mono red )],
-       keys => 1,
-});
-
-:>
-<h1>vi/vim cheat sheet</h1>
-
-<h2>normal mode (default)</h2>
-
 <:
-use Shiar_Sheet::Keyboard 2.08;
-my $info = Data('vi.eng');
-my $keys = Shiar_Sheet::Keyboard->new($info);
-$keys->map($get{map}) or undef $get{map};
-$keys->print_rows($get{rows});
-$keys->print_legends(\%get);
-
+$Request = 'vi';
+Include 'keyboard.plp';
index 4fc3771a3c30ff49769bb27742e8ede75121fcf7..5338ecd98eae620376ced63e96605da3cbe4763e 100644 (file)
@@ -1,6 +1,14 @@
 use utf8;
 # vimperator v3.16.0
 {
+title => 'Vimperator',
+version => '1.3',
+description => [
+       "Interactive cheat sheet for the Vimperator (or Pentadactyl)",
+       "Firefox extension, describing the function of each key.",
+],
+keywords => [qw'vimperator firefox pentadactyl vim browser vimfx vimium cvim'],
+
 key => {
        '~' => "open home<>dir",
        '@' => "play macro",
index 624f4129f034a75d15e0c0e677727f8f8a3ca82e..50baa1b7ae8fa9b2a82ca1efa743bc0481f04db8 100644 (file)
@@ -1,30 +1,3 @@
-<(common.inc.plp)><:
-
-Html({
-       title => 'vimperator cheat sheet',
-       version => '1.3',
-       description => [
-               "Interactive cheat sheet for the Vimperator (or Pentadactyl)",
-               "Firefox extension, describing the function of each key.",
-       ],
-       keywords => [qw'
-               vimperator firefox pentadactyl vim sheet cheat reference overview
-               commands keyboard browser vimfx vimium cvim
-       '],
-       stylesheet => [qw( light dark circus mono red )],
-       keys => 1,
-});
-
-:>
-<h1>Vimperator cheat sheet</h1>
-
-<h2>normal mode (default)</h2>
-
 <:
-use Shiar_Sheet::Keyboard 2.07;
-my $info = Data('vimperator.eng');
-my $keys = Shiar_Sheet::Keyboard->new($info);
-$keys->map($get{map}) or undef $get{map};
-$keys->print_rows($get{rows});
-$keys->print_legends(\%get);
-
+$Request = 'vimperator';
+Include 'keyboard.plp';