Add 2 Actions scripts which search freshmeat/google for the selected text using the...
[claws.git] / tools / google_search.pl
1 #!/usr/bin/perl
2
3 my $google = "http://www.google.com/search?q";
4 $_ = <>;
5
6 chdir($ENV{HOME} . "/.sylpheed") or die("Can't find your .sylpheed directory\n");
7
8 open (SYLRC, "<sylpheedrc") || die("Can't open the sylpheedrc file\n");
9         @rclines = <SYLRC>;
10 close SYLRC;
11
12 foreach $rcline (@rclines) {
13         if ($rcline =~ m/^uri_open_command/) {
14                 chomp $rcline;
15                 @browser = split(/=/, $rcline);
16                 $browser[1] =~ s/ '%s'$//;
17         }
18 }
19
20 system("$browser[1] '$google=$_' &");
21
22 exit;
23
24