No Programming, No Life

プログラミング関連の話題や雑記

Googleをシェルっぽく操作する

Googleをシェルっぽく操作するサイト「goosh」というサイトがあるらしい。
>> goosh.org - the unofficial google shell.

ちょっと試したみたところ

 Goosh goosh.org 0.5.0-beta #1 Mon, 23 Jun 08 12:32:53 UTC Google/Ajax

Welcome to goosh.org - the unofficial google shell.

This google-interface behaves similar to a unix-shell.
You type commands and the results are shown on this page.

goosh is powered by google.

goosh is written by Stefan Grothkopp 
it is NOT an official google product!
goosh is open source under the Artistic License/GPL.

Enter help or h for a list of commands.

Loading local settings...

guest@goosh.org:/web>

アクセスするとまずこのような感じになる。カーソルは最後の web> の後にある状態。

ここで「web hatena」などと入力することでGoogle検索ができる
  1) 	Web hosting, domain name registration and web services by 1&1 Internet
1&1 offers Web hosting, domain names, website builders, servers, and email solutions. Find affordable, dedicated ad-free web hosting, domain name ...
http://www.hatena.us/
 
  2) 	Hatena
Hatena lets you publish blogs, share bookmarks, and create online photo albums. We're working hard to make our services available in more languages. ...
http://www.hatena.com/
 
  3) 	はてな
はてなが運営するポータルサイト。ブログもウェブアルバムもニュースも、はてながあれ ばネットがさらに便利になります。ニンテンドーDSiのソフト「うごくメモ帳」で ...
http://www.hatena.ne.jp/
 
  4) 	Hatena - Wikipedia, the free encyclopedia
Dec 29, 2008 ... Hatena (Hatena arenicola) is a one celled organism recently discovered in Japan. The Hatena is a flagellate, and can resemble a plant at one ...
http://en.wikipedia.org/wiki/Hatena
 
guest@goosh.org:/web> 

「hatena」で検索した結果が上記のような感じになる。また、最終行の「guest@goosh.org:/web> 」にカーソルがきているため、再度コマンドの入力が可能となる。
ちなみに、ここで「more」と入力すると、検索結果の次のページが取得できる。

コマンドはどんなのがあるの?

helpコマンドを実行したところ

guest@goosh.org:/web> help
help

command	aliases	parameters	function
web	(search,s,w)	[keywords]	google web search
news	(n)	[keywords]	google news search
more	(m)		get more results
blogs	(blog,b)	[keywords]	google blog search
read	(rss,r)		read feed of url
feeds	(feed,f)	[keywords]	google feed search
place	(places,map,p)	[address]	google maps search
translate	(trans,t)	[lang1] [lang2] 	google translation
images	(image,i)	[keywords]	google image search
video	(videos,v)	[keywords]	google video search
clear	(c)		clear the screen
wiki	(wikipedia)	[keywords]	wikipedia search
help	(man,h,?)	[command]	displays help text
cd			change mode
site	(in)	 	search in a specific website
open	(o)		open url in new window
go	(g)		open url
lucky	(l)	[keywords]	go directly to first result
ls		[command]	lists commands
addengine			add goosh to firefox search box
load			load an extension
calculate	(calc)	[mathematical expression]	evaluate a mathematical expression
settings	(set)	[name] [value]	edit settings
gmail	(mail)	[compose]	read & write mail in gmail *
login			login with your google account *
logout			log out of goosh *

  • Enter green commands without parameters to change default mode.
  • Anything that's not a command will search in current default mode.
  • Aliases will expand to commands. Numbers will expand to corresponding search results.
  • Use cursor up and down for command history.
  • Enter keyword and hit the tab-key for tab-completion.
  • Commands marked with * are experimental, use them with care and please report any bugs.

いろいろあるみたいですね。

試してみて分かったこと (Windows)

日本語入力して確定のため「Enter」キーを押してしまうと検索が実行されてしまいます。仕方ないので、変換中に「半角/全角」を二度押しすることで回避しています。