Source

shlomif-email-signature / gen-shlomif-at-iglu-sig

Full commit
(no ...@adde3d42… d640c5f 






(no ...@adde3d42… 7a5a43e 



(no ...@adde3d42… d640c5f 

(no ...@adde3d42… 7a5a43e 
(no ...@adde3d42… d640c5f 


(no ...@adde3d42… a571687 
(no ...@adde3d42… d808d5b 
(no ...@adde3d42… a571687 
(no ...@adde3d42… d640c5f 
Shlomi Fish ec617cb 
Shlomi Fish f30cf9c 
(no ...@adde3d42… d9b4ff5 
(no ...@adde3d42… d808d5b 
(no ...@adde3d42… d640c5f 
(no ...@adde3d42… d808d5b 

(no ...@adde3d42… 1267a0f 
Shlomi Fish 4a721d1 
Shlomi Fish f468d66 

(no ...@adde3d42… d640c5f 
(no ...@adde3d42… d0a4306 

(no ...@adde3d42… d640c5f 
(no ...@adde3d42… d808d5b 
(no ...@adde3d42… 4fd4e27 
Shlomi Fish ae9d62a 
(no ...@adde3d42… d808d5b 
(no ...@adde3d42… d640c5f 
Shlomi Fish 9165942 
(no ...@adde3d42… d808d5b 



(no ...@adde3d42… 58ced0b 
Shlomi Fish 1c39325 
(no ...@adde3d42… d808d5b 


(no ...@adde3d42… d640c5f 



(no ...@adde3d42… 8c26916 
(no ...@adde3d42… 7a5a43e 
(no ...@adde3d42… 5a14d53 
(no ...@adde3d42… 7a5a43e 


(no ...@adde3d42… 4294bb5 

(no ...@adde3d42… 7a5a43e 
(no ...@adde3d42… d640c5f 





(no ...@adde3d42… 7a5a43e 
(no ...@adde3d42… d14837d 
(no ...@adde3d42… d640c5f 

(no ...@adde3d42… 4294bb5 
(no ...@adde3d42… d640c5f 
#!/usr/bin/perl

use strict;
use warnings;

use IO::All;

use File::Spec::Functions qw( catpath splitpath rel2abs );

my $script_dir = catpath( ( splitpath( rel2abs $0 ) )[ 0, 1 ] );

my $sig = io()->file($ENV{HOME}."/.signature")->slurp();

# my ($quote) = ($sig =~ m{(([^\n]*\w[^\n]*\n)+)\z}ms);

my @resource_lines =
(
    qq{Apple Inc. is Evil - http://www.shlomifish.org/open-source/anti/apple/},
    qq{Best Introductory Programming Language - http://shlom.in/intro-lang},
    qq{Escape from GNU Autohell - http://www.shlomifish.org/open-source/anti/autohell/},
    qq{First stop for Perl beginners - http://perl-begin.org/},
    qq{Free (Creative Commons) Music Downloads, Reviews and more - http://jamendo.com/},
    qq{Freecell Solver - http://fc-solve.shlomifish.org/},
    qq{Chuck Norris/etc. Facts - http://www.shlomifish.org/humour/bits/facts/},
    qq{Funny Anti-Terrorism Story - http://shlom.in/enemy}, # The Enemy and How I Helped to Fight it.
    qq{http://www.shlomifish.org/humour/ways_to_do_it.html},
    qq{"Humanity" - Parody of Modern Life - http://shlom.in/humanity},
    qq{Interview with Ben Collins-Sussman - http://shlom.in/sussman},
    qq{List of Portability Libraries - http://shlom.in/port-libs},
    qq{List of Text Editors and IDEs - http://shlom.in/IDEs},
    qq{List of Text Processing Tools - http://shlom.in/text-proc},
    qq{List of Networking Clients - http://shlom.in/net-clients},
    qq{My Aphorisms - http://www.shlomifish.org/humour.html},
    qq{My Public Domain Photos - http://www.flickr.com/photos/shlomif/},
    qq{My Favourite FOSS - http://www.shlomifish.org/open-source/favourite/},
    qq{Original Riddles - http://www.shlomifish.org/puzzles/},
    qq{Optimising Code for Speed - http://shlom.in/optimise},
    qq{Parody of "The Fountainhead" - http://shlom.in/towtf},
    qq{Perl Humour - http://perl-begin.org/humour/},
    qq{Rethinking CPAN - http://shlom.in/rethinking-cpan},
    qq{Stop Using MSIE - http://www.shlomifish.org/no-ie/},
    qq{Selina Mandrake - The Slayer (Buffy parody) - http://shlom.in/selina},
    qq{"Star Trek: We, the Living Dead" - http://shlom.in/st-wtld},
    qq{The Case for File Swapping - http://shlom.in/file-swap},
    qq{"The Human Hacking Field Guide" - http://shlom.in/hhfg},
    qq{Understand what Open Source is - http://shlom.in/oss-fs},
    qq{UNIX Fortune Cookies - http://www.shlomifish.org/humour/fortunes/},
    qq{Beginners Site for the Vim text editor - http://vim.begin-site.org/},
    qq{What does "Zionism" mean? - http://shlom.in/def-zionism},
    qq{What Makes Software Apps High Quality -  http://shlom.in/sw-quality},
    qq{Why I Love Perl - http://shlom.in/joy-of-perl},
);

my $line = $resource_lines[rand(@resource_lines)];

my $quotes_text = io()->encoding('utf-8')->file("$script_dir/shlomif-sig-quotes")->slurp;

my @quotes = grep { /\S/ } split(/^\n*%\n*$/ms, $quotes_text);

my $quote = $quotes[rand(scalar(@quotes))];

$quote =~ s{\n+\z}{}ms;
$quote =~ s{\A\n+}{}ms;

my $text = <<"EOF";
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
$line

$quote

Please reply to list if it's a mailing list post - http://shlom.in/reply .
EOF

binmode STDOUT, ":utf8";
print $text;