topics!
authorJoey Hess <joey@kodama.kitenet.net>
Thu, 25 Oct 2007 08:41:17 +0000 (04:41 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Thu, 25 Oct 2007 08:41:17 +0000 (04:41 -0400)
fanboy
filters.6

diff --git a/fanboy b/fanboy
index 32fe7e396f7f06b3279b5a4ff547c876cbbf1725..c685ed0665af3a65d21527e0ec06eb057bbddee2 100755 (executable)
--- a/fanboy
+++ b/fanboy
@@ -1,11 +1,21 @@
 #!/usr/bin/perl
 
+my %topics=(
+       git => [qw(linus git linux rebase rebased merge merged cherry-pick
+               branch branched branches git-*)],
+       ubuntu => [qw(Mark MOTU ubuntu debian rock rocks rule naked dapper
+               feisty fiesty gutsy hoary edgy universe launchpad gnome desktop
+               sabdfl)],
+);
+
 if (! @ARGV) {
-       @ARGV=qw(linus git linux rebase rebased merge merged cherry-pick
-               branch branched branches git-*);
+       @ARGV=@{$topics{git}};
+}
+elsif (@ARGV == 1 && exists $topics{$ARGV[0]}) {
+       @ARGV=@{$topics{$ARGV[0]}};
 }
 
-my $coolstuff=join("|", 
+my $total_awesomeness_dude=join("|", 
        map {
                $_=quotemeta($_);
                s/\\\*/.*/g;
@@ -17,7 +27,7 @@ my $len=0;
 my $indent="";
 my $indent_printed=0;
 while (<STDIN>) {
-       if (/$coolstuff/) {
+       if (/$total_awesomeness_dude/) {
                if (/^([>|][>|\s]*)/) {
                        if ($indent ne $1) {
                                print "\n" if $len;
@@ -35,7 +45,7 @@ while (<STDIN>) {
                        $indent_printed=0;
                }
 
-               while(/(($coolstuff)[.?!]*)/ig) {
+               while(/(($total_awesomeness_dude)[.?!]*)/ig) {
                        $len+=length($1)+1;
                        if ($len > 70) {
                                print "\n";
index 3d9e13a4ebd3725857a8f7aa83a962347a300506..647b982b9d2414a146d8a761e15c40392b762647 100644 (file)
--- a/filters.6
+++ b/filters.6
@@ -27,7 +27,8 @@ K3wl hacker slang
 .IP fanboy
 Speak like a fanboy. By default, it will speak like a fan of git/Linus/linux
 development. To change this, pass as parameters the words that the fanboy
-typically uses.
+typically uses. Alternatively, pass the name of a topic that typically has
+fanboys to use a predefined word list.
 .IP fudd
 Elmer Fudd
 .IP jethro
This page took 0.012132 seconds and 4 git commands to generate.