X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/959984aabc5adb85b5b85d08ff7b247442075399..03abf85a7ec9775993766a3fd10cd2876aef0b42:/index.plp diff --git a/index.plp b/index.plp index 1aaf0f6..f8a1938 100644 --- a/index.plp +++ b/index.plp @@ -2,14 +2,13 @@ Html({ title => 'cheat sheets', - version => 'v1.4', + version => '1.9', description => [ "Cheat sheets summarising various software programs and standards.", ], keywords => [qw' sheet cheat reference software overview summary help keyboard map unicode '], - stylesheet => [qw'light dark red'], }); :> @@ -22,11 +21,22 @@ the following topics have been condensed into single pages of reference. Originally created by Mischa Poslawsky, but you're free to use, print, alter, and redistribute under the AGPL license.

+<: +my @format = ('--date=short', "--pretty=%ad (%ar)\t%s"); +if (open my $log, '-|', git => 'log', -1, @format) {{ + my $line = readline $log; + $line or next; # explicitly ignore empty input + my ($date, $subject) = split /[\t\n]/, $line; + $date =~ s/ \K// and $date .= ''; + say "

Last update: $date $subject

"; +}} +:>

Keyboard maps

@@ -52,22 +63,12 @@ but you're free to use, print, alter, and redistribute under the AGPL license. -<: -if (open my $log, '-|', 'git log -20 --since=2\ week\ ago --pretty=%ai%x00%s%x00%h') { - print "

Recent updates

\n\n"; - print "
\n"; - while (readline $log) { - chomp; - my ($date, $subject, $commit) = split /\0/, $_; - $date =~ s{( .+)}{$1}; - printf '
%s
%s
'."\n", $date, $subject; - } - print "
\n\n"; -} -