Mailinglist Archive: opensuse (1473 mails)

< Previous Next >
[opensuse] Stupid Google Redirect URL Utility
  • From: Randall R Schulz <rschulz@xxxxxxxxx>
  • Date: Mon, 8 Jun 2009 15:37:51 -0700
  • Message-id: <200906081537.52051.rschulz@xxxxxxxxx>
Hi,

I am most peeved by Google's recent change that make it impossible to
copy URLs or Save Link As... from the search results pages.

So I wrote a couple scripts to ease the process a bit. The basic script
and the pair as a whole are named for an initialism for Stupid Google
Redirect URL: SGRU (which you should feel free to pronounce
as "screw").

- sgru [stupid-Google-Redirect-URL]
Convert a SGRU to a real URL. If no command-line parameter is given,
the contents of the Klipboard is used.

- sgruget [stupid-Google-Reirect-URL]
Retrieve a the contents of a SGRU using wget. If no command-line
parameter is given, the contents of the Klipboard is used.

- klip
Manipulate the Klipboard from the command line

For me, the most common use is to copy-link one of these URLs switch to
a shell and run either sgru (if I need the URL) or sgruget (if I want
to download).

One thing to keep in mind is that wget preserves the modification time
returned by the server while simply saving a URL from Firefox does not.
So if you're used to seeing newly downloaded files at the top of a
time-ordered directory listing, this may surprise you.

Although I haven't done it yet, I think assigning a global keyboard
accelerator to the default (no-argument) "sgru" invocation would be
useful, especially if you like to copy URLs from Google search results
pages often.


Randall Schulz
< Previous Next >