Post a Comment
http://surfraw.alioth.debian.org/
Kinda the same thing but with more sites. And as it runs from an actual shell you can script it 
My first thoughts were: Why use a separate shell for this? Why not write a set of command-line tools that can be used in an existing shell?
I could imagine two reasons. The first is that simple command names like "google" or "translate" aren't exactly common in today's command line environments. Few people would ever dare bind a command like "translate" to google services because, "well, people may want to use another translation service, and we also want to give it a cooler name". Ironically, in the old days of the command-line, such a kind of simplicity was much more common.
The second reason is that Goosh outputs hypertext (e.g. embedded links), for which typical command line environments like bash (let alone Windows's cmd.exe) are not prepared.
I'm thinking of a desktop applet for the N8*0 tablet. I'm pretty sure one of the existing applets can be config our outright modified to display this url instead of it's default one.
The hyperlinked output means I can pop open child browsers easily but as mentioned, the best use is instant access to whatever crazy stuff the write in behind the search interface. I may actually learn the translation, conversion and other "search terms" functions beyond searching. 
Well, what do you think a "shell" is? It's a wrapper around operating system APIs and commands. This is obviously several levels up the stack from that. But, it's still technically a shell.
If you're into this kind of things... you may find http://yubnub.org/ interesting.
I'm using vimperator [1] to control firefox.
Like vim itself, having a console like interface reduces the need for mouse navigation and adds complex-commands-at-a-single-phrase. (':t hello world' opens a new search tab with the phrase "hello world").
... Now I wonder if vimperator could be made to interface directly with gosh.org?
- Gilboa
[1] http://vimperator.mozdev.org/
Edited 2008-06-04 00:30 UTC
Create a file on your Windows desktop called "Goosh.hta" with the following contents. It will pop a chromeless Goosh!
<html>
<head><meta http-equiv="Content-Type" content="application/hta; charset=utf-8" />
<HTA:APPLICATION
APPLICATIONNAME="Goosh Command Prompt"
CAPTION="yes"
SHOWINTASKBAR="yes"
SINGLEINSTANCE="no"
SYSMENU="yes"
SCROLL="no"
INNERBORDER="no"
WINDOWSTATE="normal">
<title>Goosh Command Prompt</title>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0">
<iframe id="frame" APPLICATION="no" scrolling="yes" frameborder="0" width="100%" height="100%" src="http://www.goosh.org/"></iframe>
</body>
</html>
Edited 2008-06-04 03:22 UTC
I'm thinking forward and may write some stupid ideas... :-)
First, you need an xargs line parameter processor that puts your input into an HTTP request (it should be easy to implement just by lloking what the browser sends to goosh when you enter some query text); then, you get a HTML answer back which you can process by piping it though lynx -dump or ripping the HTML cover off. If pictures are included, download them and convert them into ASCII art, there are libraries that do help with this kind of conversion. Or you output just a hyperlink so it can be postprocessed in other ways.
I'm thinking of a "real" CLI tool that can be embedded in scipts, or used on the console, the same way you use your usual CLI tools - including information redirection and piping. It would have to be able to be used in dialog mode and in batch mode (without interaction).
Just imagine what fun it could be to use google's power without the web layer! :-)
% grep -v root /etc/passwd | cut -d ":" -f 1 | goosh -img -goodluck -o - | convert_ascii | less
Shouldn't be that hard. You can add protocol handlers via the registry. Most likely it will be enough to have PuTTy installed and to add a handler vor ssh://
In firefox you can also do this by hand ... I've got a link here which unfortunatly is in German:
http://flexible.xapient.net/?p=27
I onced did this for tel://<phone_number> in an enterprise environment to be able to create system wide links which will tell the telephony software to make a call to the link's phone number.
Regards
Edited 2008-06-04 07:46 UTC






