use strict;
use warnings;
-our $VERSION = 'v1.01';
+our $VERSION = 'v1.02';
sub import {
my $class = shift;
my %sign = (
- -ascii => 0,
- charset=> 'utf-8',
arg => '·', # described as 'dot'
args => '⁚',
argi => '′',
use File::stat 'stat';
use HTTP::Date;
-use Shiar_Sheet::KeySigns qw(%sign); # dependant on $get{ascii}
+use Shiar_Sheet::KeySigns qw(%sign);
our $style;
our $showkeys = !exists $get{keys} ? undef :
ref $_ eq 'ARRAY' and $_ = stylesheet(@$_)."\n" for $meta->{stylesheet};
# other vars
- my $sep = $meta->{charset} eq 'utf-8' ? '•' : ' -- ';
my ($file) = $ENV{SCRIPT_FILENAME} =~ m{ ([^/]+) \.plp$ }x;
# leading output
rel="code" title="Written in Perl">plp</a>
<a href="http://git.shiar.nl/sheet.git/history/HEAD:/$file.plp"
rel="vcs-git" title="Git repository">$meta->{version}</a>
- created by <a href="http://shiar.nl/" rel="author">Shiar</a> $sep
+ created by <a href="http://shiar.nl/" rel="author">Shiar</a> $sign{sep}
<a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html" rel="copyright"
title="Licensed under the GNU Affero General Public License, version 3">AGPLv3</a>
</p>
<ul class="legend legend-set">
<li>keyboard <strong>map</strong> is
<:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
- <li><strong>ascii</strong> mode is
- <:= defined $sign{-ascii} && 'forced ' :><em><:=
- $sign{-ascii} ? 'on' : 'off' :></em>
<li><strong>keys</strong> are
<em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
!exists $get{keys} && ' by default' :>
]],
qwertz => [[
- [qw/ ^ 1 2 3 4 5 6 7 8 9 0 /, $ascii ? ('ss', '^0') : ('ß', '´') ],
- [$ascii ? '^0' : '°', qw{ ! " }, $ascii ? '^0' : '§', qw{ $ % & / ( ) = ? ` }],
- [qw/^^ ^0 ^0 ^0 ^0 ^0 ^0 { [ ] } \\ ^0 /],
-# [qw{ ° ! " § $ % & / ( ) = ? ` }],
-], [
- [qw/ q w e r t z u i o p /, $ascii ? 'ue' : 'ü', '+' ],
- [qw/ Q W E R T Z U I O P /, $ascii ? 'UE' : 'Ü', '*' ],
- [qw/ @ ^w ^e ^r ^t ^z ^u ^i ^o ^p ^0 ~ /],
+ [qw/ ^ 1 2 3 4 5 6 7 8 9 0 ß ´ /],
+ [qw{ ° ! " § $ % & / ( ) = ? ` }],
+ [qw/^^ ^0 ^0 ^0 ^0 ^0 ^0 { [ ] } \\ ^0 /],
+# [qw{ ° ! " § $ % & / ( ) = ? ` }],
+], [
+ [qw/ q w e r t z u i o p ü + /],
+ [qw/ Q W E R T Z U I O P Ü * /],
+ [qw/ @ ^w ^e ^r ^t ^z ^u ^i ^o ^p ^0 ~ /],
# ^ show altgr-Q instead
], [
- [qw/ a s d f g h j k l /, $ascii ? ('oe', 'ae') : ('ö', 'ä'), '#' ],
- [qw/ A S D F G H J K L /, $ascii ? ('OE', 'AE') : ('Ö', 'Ä'), "'" ],
- [qw/^a ^s ^d ^f ^g ^h ^j ^k ^l ^0 ^0 ^0 /],
+ [qw/ a s d f g h j k l ö ä # /],
+ [qw/ A S D F G H J K L Ö Ä ' /],
+ [qw/^a ^s ^d ^f ^g ^h ^j ^k ^l ^0 ^0 ^0 /],
], [
[qw/ y x c v b n m , . - < /],
[qw/ Y X C V B N M ; : _ > /],
]],
azerty => [[
- [qw/ < & /, $ascii ? 'e\'' : 'é', qw/ " ' ( - ^_ _ /, $ascii ? 'c,' : 'ç', qw/ @ ) = /],
+ [qw/ < & é " ' ( - ^_ _ ç @ ) = /],
[qw/ > 1 2 3 4 ^[ 6 7 8 9 0 ^] + /], # 5 unused atm
# [qw/ < & é " ' ( - ^_ _ ç @ ) = /], # à→@→^@, è→^_
[qw/^\\ ^0 ~ # { [ | ` \\ ^0 ^@ ] } /], # °→^]
], [
[qw/ a z e r t y u i o p ^ $ /],
- [qw/ A Z E R T Y U I O P /, $ascii ? (":'", 'Pd') : ('¨', '£')],
- [qw/^a ^z ^e ^r ^t ^y ^u ^i ^o ^p ^^ /, $ascii ? 'Cu' : '¤'],
+ [qw/ A Z E R T Y U I O P ¨ £ /],
+ [qw/^a ^z ^e ^r ^t ^y ^u ^i ^o ^p ^^ ¤ /],
], [
- [qw/ q s d f g h j k l m /, $ascii ? 'u!' : 'ù', '*'],
- [qw/ Q S D F G H J K L M /, '%', $ascii ? 'My' : 'µ'],
+ [qw/ q s d f g h j k l m ù * /],
+ [qw/ Q S D F G H J K L M % µ /],
[qw/^q ^s ^d ^f ^g ^h ^j ^k ^l ^m ^0 ^0 /],
], [
- [qw( w x c v b n , ; : ! )],
- [qw( W X C V B N ? . / ), $ascii ? 'SE' : '§' ],
- [qw(^w ^x ^c ^v ^b ^n ^? ^0 ^0 ^0 )],
+ [qw( w x c v b n , ; : ! )],
+ [qw( W X C V B N ? . / § )],
+ [qw(^w ^x ^c ^v ^b ^n ^? ^0 ^0 ^0 )],
]],
arensito => [[
less sheet cheat keys pager more
shortkey reference keyboard commands options overview
'],
- charset => $sign{charset},
stylesheet => [qw'light dark circus mono red terse'],
keys => 1,
});
<ul class="legend legend-set">
<li>keyboard <strong>map</strong> is
<:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
- <li><strong>ascii</strong> mode is
- <:= defined $sign{-ascii} && 'forced ' :><em><:=
- $sign{-ascii} ? 'on' : 'off' :></em>
<li><strong>keys</strong> are
<em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
!exists $get{keys} && ' by default' :>
keywords => [qw'
mplayer video media sheet cheat reference overview control shortkey keyboard
'],
- charset => $sign{charset},
stylesheet => [qw'light dark circus mono red terse'],
keys => 1,
});
<ul class="legend legend-set">
<li>keyboard <strong>map</strong> is
<:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
- <li><strong>ascii</strong> mode is
- <:= defined $sign{-ascii} && 'forced ' :><em><:=
- $sign{-ascii} ? 'on' : 'off' :></em>
<li><strong>keys</strong> are
<em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
!exists $get{keys} && ' by default' :>
keywords => [qw'
mutt MUA email client sheet cheat reference overview commands keyboard
'],
- charset => $sign{charset},
stylesheet => [qw'light dark circus mono red terse'],
keys => 1,
});
<ul class="legend legend-set">
<li>keyboard <strong>map</strong> is
<:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
- <li><strong>ascii</strong> mode is
- <:= defined $sign{-ascii} && 'forced ' :><em><:=
- $sign{-ascii} ? 'on' : 'off' :></em>
<li><strong>keys</strong> are
<em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
!exists $get{keys} && ' by default' :>
keywords => [qw'
nethack rogue game control controls sheet reference overview keyboard
'],
- charset => $sign{charset},
stylesheet => [qw'light dark circus mono red terse'],
keys => 1,
});
<ul class="legend legend-set">
<li>keyboard <strong>map</strong> is
<:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
- <li><strong>ascii</strong> mode is
- <:= defined $sign{-ascii} && 'forced ' :><em><:=
- $sign{-ascii} ? 'on' : 'off' :></em>
<li><strong>keys</strong> are
<em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
!exists $get{keys} && ' by default' :>
},
'^x' => {
- lead => $ascii ? "'x" : "x̂",
+ lead => "x̂",
"\e" => ['mv mode', '+'],
keywords => [qw'
readline gnu bash emacs sheet cheat reference overview keyboard editing curses
'],
- charset => $sign{charset},
stylesheet => [qw'light dark circus mono red terse'],
keys => 1,
});
<ul class="legend legend-set">
<li>keyboard <strong>map</strong> is
<:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
- <li><strong>ascii</strong> mode is
- <:= defined $sign{-ascii} && 'forced ' :><em><:=
- $sign{-ascii} ? 'on' : 'off' :></em>
<li><strong>keys</strong> are
<em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
!exists $get{keys} && ' by default' :>
screen sheet cheat reference overview commands keyboard
terminal window manager
'],
- charset => $sign{charset},
stylesheet => [qw'light dark circus mono red terse'],
keys => 1,
});
<ul class="legend legend-set">
<li>keyboard <strong>map</strong> is
<:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
- <li><strong>ascii</strong> mode is
- <:= defined $sign{-ascii} && 'forced ' :><em><:=
- $sign{-ascii} ? 'on' : 'off' :></em>
<li><strong>keys</strong> are
<em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
!defined $showkeys && ' by default' :>
our $VERSION = 'v1.0';
-$header{content_type} = "text/html; charset=$sign{charset}";
+$header{content_type} = "text/html; charset=utf-8";
:><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<ul class="legend legend-set">
<li>keyboard <strong>map</strong> is
<:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
- <li><strong>ascii</strong> mode is
- <:= defined $sign{-ascii} && 'forced ' :><em><:=
- $sign{-ascii} ? 'on' : 'off' :></em>
<li><strong>keys</strong> are
<em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
!exists $get{keys} && ' by default' :>
}, # mode ]
'^w' => {
- lead => $ascii ? "'w" : "ŵ",
+ lead => "ŵ",
"\e"=> ["mo mode"],
}, # mode ^w
'^wg' => {
- lead => $ascii ? "'wg" : "ŵg",
+ lead => "ŵg",
"\e"=> ["mo mode"],
'^['=> "\e",
}, # modei
'i^g' => {
- lead => $ascii ? "'g" : "ĝ",
+ lead => "ĝ",
"\e"=> ['mi modei'],
}, # mode i ^g
'i^x' => {
- lead => $ascii ? "'x" : "x̂",
+ lead => "x̂",
"\e" => ["mo mode"], # yes, it really leaves insert mode
keywords => [qw'
vi vim nvi sheet cheat reference overview commands keyboard
'],
- charset => $sign{charset},
stylesheet => [qw'light dark circus mono red terse'],
keys => 1,
});
<ul class="legend legend-set">
<li>keyboard <strong>map</strong> is
<:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
- <li><strong>ascii</strong> mode is
- <:= defined $sign{-ascii} && 'forced ' :><em><:=
- $sign{-ascii} ? 'on' : 'off' :></em>
<li><strong>keys</strong> are
<em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
!defined $showkeys && ' by default' :>
vimperator firefox vim iceweasel sheet cheat reference overview
commands keyboard browser
'],
- charset => $sign{charset},
stylesheet => [qw'light dark circus mono red terse'],
keys => 1,
});
<ul class="legend legend-set">
<li>keyboard <strong>map</strong> is
<:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
- <li><strong>ascii</strong> mode is
- <:= defined $sign{-ascii} && 'forced ' :><em><:=
- $sign{-ascii} ? 'on' : 'off' :></em>
<li><strong>keys</strong> are
<em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
!exists $get{keys} && ' by default' :>