Add 2 Actions scripts which search freshmeat/google for the selected text using the...
authorPaul Mangan <paul@claws-mail.org>
Sat, 15 Feb 2003 11:22:47 +0000 (11:22 +0000)
committerPaul Mangan <paul@claws-mail.org>
Sat, 15 Feb 2003 11:22:47 +0000 (11:22 +0000)
ChangeLog.claws
tools/Makefile.am
tools/README
tools/freshmeat_search.pl [new file with mode: 0644]
tools/google_search.pl [new file with mode: 0644]

index b24ce66..074dec4 100644 (file)
@@ -1,3 +1,17 @@
+2003-02-15 [paul]
+
+       * tools/Makefile.am
+         tools/README
+         tools/freshmeat_search.pl     ** NEW FILE **
+         tools/google_search.pl        ** NEW FILE **
+               Add 2 Actions scripts which search freshmeat/google
+               for the selected text using the browser configured
+               in sylpheedrc.
+               
+       Note: These scripts are very dependent on the format of the
+       browser command and may not work on every occasion. Testing
+       is welcome. 
+
 2003-02-14 [alfons]    0.8.10claws12
 
        * src/compose.c
index b764b07..298dd7f 100644 (file)
@@ -3,9 +3,11 @@ EXTRA_TOOLS = \
        calypso_convert.pl \
        eud2gc.py \
        filter_conv.pl \
+       freshmeat_search.pl \
        gif2xface.pl \
        gpg-sign-syl \
        google_msgid.pl \
+       google_search.pl \
        kmail2sylpheed.pl \
        kmail2sylpheed_v2.pl \
        launch_phoenix \
index 5b9844e..10c1f3f 100644 (file)
@@ -4,8 +4,10 @@ Contents of the tools directory:
 --------------------------------------------------------------------------------
 
 Action scripts:
+  freshmeat_search.pl          Search freshmeat.net for selected text
   gpg-sign-syl                  Clear-sign current selection
-  google_msgid.pl               Lookup selected message-id in google
+  google_msgid.pl               Search groups.google.com for selected message-id
+  google_search.pl             Search google.com for selected text
   uudec                         Decode and display uuencoded images
 
 Addressbook conversion:
diff --git a/tools/freshmeat_search.pl b/tools/freshmeat_search.pl
new file mode 100644 (file)
index 0000000..ec55440
--- /dev/null
@@ -0,0 +1,22 @@
+#!/usr/bin/perl
+
+my $freshmeat = "http://freshmeat.net/search?q";
+$_ = <>;
+
+chdir($ENV{HOME} . "/.sylpheed") or die("Can't find your .sylpheed directory\n");
+
+open (SYLRC, "<sylpheedrc") || die("Can't open the sylpheedrc file\n");
+       @rclines = <SYLRC>;
+close SYLRC;
+
+foreach $rcline (@rclines) {
+       if ($rcline =~ m/^uri_open_command/) {
+               chomp $rcline;
+               @browser = split(/=/, $rcline);
+               $browser[1] =~ s/ '%s'$//;
+       }
+}
+
+system("$browser[1] '$freshmeat=$_' &");
+
+exit;
diff --git a/tools/google_search.pl b/tools/google_search.pl
new file mode 100644 (file)
index 0000000..22213d0
--- /dev/null
@@ -0,0 +1,24 @@
+#!/usr/bin/perl
+
+my $google = "http://www.google.com/search?q";
+$_ = <>;
+
+chdir($ENV{HOME} . "/.sylpheed") or die("Can't find your .sylpheed directory\n");
+
+open (SYLRC, "<sylpheedrc") || die("Can't open the sylpheedrc file\n");
+       @rclines = <SYLRC>;
+close SYLRC;
+
+foreach $rcline (@rclines) {
+       if ($rcline =~ m/^uri_open_command/) {
+               chomp $rcline;
+               @browser = split(/=/, $rcline);
+               $browser[1] =~ s/ '%s'$//;
+       }
+}
+
+system("$browser[1] '$google=$_' &");
+
+exit;
+
+