├── README.md ├── deploy.sh ├── g.php ├── goosh.css ├── goosh ├── ajax │ └── ajax.js ├── config │ └── config.js ├── goosh.js ├── goosh_alt.js ├── gui │ └── gui.js ├── lang │ └── lang.js ├── lib │ ├── chop.js │ ├── cookie.js │ ├── dump.js │ ├── get.js │ ├── in_array.js │ ├── keyboard.js │ └── namespace.js ├── mod-alt │ ├── gmail.js │ ├── images.js │ ├── login.js │ ├── logout.js │ ├── place.js │ ├── translate.js │ └── video.js ├── module-exp │ └── .gitkeep ├── module │ ├── addengine.js │ ├── amazon.js │ ├── blogs.js │ ├── calc.js │ ├── cd.js │ ├── clear.js │ ├── feed.js │ ├── go.js │ ├── help.js │ ├── inurl.js │ ├── load.js │ ├── ls.js │ ├── lucky.js │ ├── more.js │ ├── news.js │ ├── open.js │ ├── read.js │ ├── settings.js │ ├── sponsors.js │ ├── web.js │ └── wiki.js ├── modules │ └── modules.js ├── searchers │ ├── .feed.js │ └── lang.js └── set │ └── set.js └── index.php /README.md: -------------------------------------------------------------------------------- 1 | # goosh 2 | ## About 3 | goosh is an interface to google search that behhaves similar to a unix-shell. 4 | You type commands and the results are displayed on the page. 5 | 6 | goosh is powered by google custom search. 7 | 8 | ## Example 9 | Take a look at goosh.org to see goosh in action 10 | 11 | ## License 12 | goosh is open source under the Artistic License/GPL. 13 | 14 | -------------------------------------------------------------------------------- /deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "deploy goosh.org"; 4 | echo "wget goosh.js"; 5 | #wget http://gshell.grothkopp.com/goosh.js -O goosh.js.uncompr -o /dev/null 6 | #wget http://n.goosh.org/g.php -O goosh.js.uncompr -o /dev/null 7 | php g.php >goosh.js.uncompr 8 | 9 | echo "compress goosh.js"; 10 | java -jar yui/yuicompressor-2.3.5/build/yuicompressor-2.3.5.jar --type js goosh.js.uncompr -o goosh.js.compr.tmp 11 | 12 | echo "gzip" 13 | 14 | cat goosh.js.compr.tmp |sed s\#gshell.grothkopp.com\#goosh.org\#g |sed s\#ABQIAAAA0cXSEVCNSwf_x74KTtPJMRShYK5vgJfK0afUKMRqjECszDItkhTOIyZ74499O_ys5nJIQuP4sq4nZg\#ABQIAAAA0cXSEVCNSwf_x74KTtPJMRQP4Q7D8MPck7bhT7upyfJTzVDU2BRxkUdd2AvzlDDF7DNUJI_Y4eB6Ug\#g >goosh.js.compr 15 | 16 | wget 'http://n.goosh.org/?deploy=1' -O goosh.html-dl -o /dev/null 17 | 18 | scriptLine=`grep -n "var goosh=new Object();" goosh.html-dl | cut -d : -f 1` 19 | 20 | cat goosh.html-dl | head -n $(($scriptLine-1)) > goosh.html 21 | cat goosh.js.compr >> goosh.html 22 | cat goosh.html-dl | tail -n +$(($scriptLine+1)) >> goosh.html 23 | 24 | #exit 25 | echo "copy files" 26 | 27 | if [ ! -f ../goosh.org/index.html ]; then 28 | mkdir ../goosh.org 29 | else 30 | cp ../goosh.org/index.html ../goosh.org/index.html-autosave 31 | fi 32 | cp goosh.html ../goosh.org/index.html 33 | #echo "gzip" 34 | 35 | -------------------------------------------------------------------------------- /g.php: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /goosh.css: -------------------------------------------------------------------------------- 1 | html { height: 100%; } 2 | body { background: #fff; font-size: 12px; font-family: monospace; height: 99%; margin:0px; padding: 0px; } 3 | form { padding: 0px; margin: 0px; } 4 | pre { font-size: 12px; } 5 | br { clear: both; } 6 | :focus { outline: 0; } 7 | input.cmdline { border: none; border: 0px; font-size: 12px; font-family: monospace; padding: 0px; margin:0px; width:100%; } 8 | table.inputtable { width:100%; vertical-align:top; } 9 | td.inputtd { width:100%; } 10 | #input { margin-left: 8px; color: #666; overflow: hidden; } 11 | #output{ margin-left: 8px; margin-top: 8px; max-width: 540px;} 12 | .less { color: #666; } 13 | .info { color: #090; } 14 | table { padding: 0px; margin: 0px; border-collapse: collapse; border-spacing: 0px; } 15 | td { padding: 0px; margin: 0px; vertical-align: top; font-size: 12px; font-family: monospace; } 16 | .help td { padding-right: 25px; font-size: 12px; } 17 | div#prompt { display: inline; white-space:nowrap; padding:0px; margin:0px; } 18 | img { border: none; } 19 | .num {width: 30px; text-align:right;} 20 | #mysite_webResult, 21 | .gsc-above-wrapper-area, 22 | .gsc-tabsAreaInvisible, 23 | .gsc-resultsHeader, 24 | .gs-watermark, 25 | .gsc-cursor-box, 26 | .gcsc-branding 27 | {display:none;} 28 | 29 | .gsc-adBlockVertical, 30 | .gsc-adBlock { 31 | float:left; 32 | margin-bottom:12px; 33 | } 34 | .gsc-resultsbox-visible {clear:both;} 35 | -------------------------------------------------------------------------------- /goosh/ajax/ajax.js: -------------------------------------------------------------------------------- 1 | goosh.lib.namespace("goosh.ajax"); 2 | 3 | goosh.ajax.contexts = new Array(); 4 | goosh.ajax.lastcontext = false; 5 | 6 | goosh.ajax.stopall = function(){ 7 | 8 | for(key in goosh.ajax.contexts){ 9 | goosh.ajax.iscontext(key); 10 | } 11 | 12 | } 13 | 14 | goosh.ajax.deletecontext = function(context){ 15 | goosh.gui.outln('Error: Operation timed out. '+context); 16 | if(!document.all) goosh.gui.outln(goosh.gui.less('If you use the noscript firefox-extension, add "ajax.googleapis.com" to the whitelist.')); 17 | goosh.gui.outln(''); 18 | goosh.ajax.contexts[context]=false; 19 | 20 | var d = document.getElementById(context); 21 | if(d) document.body.removeChild(d); 22 | 23 | goosh.gui.showinput(); 24 | goosh.gui.focusinput(); 25 | goosh.gui.scroll(); 26 | if(!document.all) stop(); 27 | 28 | } 29 | 30 | goosh.ajax.iscontext = function(name){ 31 | 32 | if(goosh.ajax.contexts[name]){ 33 | 34 | clearTimeout(goosh.ajax.contexts[name]); 35 | goosh.ajax.contexts[name] =false; 36 | 37 | var d = document.getElementById(name); 38 | if(d) document.body.removeChild(d); 39 | 40 | 41 | return true; 42 | } 43 | else return false; 44 | 45 | } 46 | 47 | goosh.ajax.getcontext = function(name){ 48 | var d = new Date(); 49 | var context = d.getTime(); 50 | if(name) context = name; 51 | 52 | goosh.ajax.contexts[context] = setTimeout("goosh.ajax.deletecontext('"+context+"');",1000*goosh.config.timeout); 53 | 54 | return context; 55 | } 56 | 57 | goosh.ajax.query = function(url,nohide){ 58 | var context = "none"; 59 | if(!nohide){ 60 | context = goosh.ajax.getcontext(); 61 | goosh.ajax.lastcontext = context; // more elegant with return, but doesnt work in opera 62 | goosh.gui.hideinput(); 63 | } 64 | 65 | 66 | var script = document.createElement("script"); 67 | document.body.appendChild(script); 68 | script.src = url+'&context='+context+'&'; 69 | script.id = context; 70 | 71 | } 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /goosh/config/config.js: -------------------------------------------------------------------------------- 1 | goosh.lib.namespace("goosh.config"); 2 | 3 | goosh.config.apikey = "ABQIAAAA0cXSEVCNSwf_x74KTtPJMRShYK5vgJfK0afUKMRqjECszDItkhTOIyZ74499O_ys5nJIQuP4sq4nZg"; 4 | 5 | goosh.config.user = "guest"; 6 | goosh.config.host = "goosh.org"; 7 | goosh.config.mode = "web"; 8 | goosh.config.pend = "> "; 9 | 10 | goosh.config.numres = 4; 11 | goosh.config.timeout = 4; 12 | 13 | goosh.config.start=0; 14 | goosh.config.moreobj; 15 | 16 | goosh.config.lang = "en"; 17 | goosh.config.urls = new Array(); 18 | goosh.config.cmdlines = new Array(); 19 | goosh.config.cmdqueue = new Array(); 20 | 21 | goosh.config.reflink = "on"; 22 | -------------------------------------------------------------------------------- /goosh/goosh.js: -------------------------------------------------------------------------------- 1 | var goosh = new Object(); 2 | goosh.lib = new Object(); 3 | 4 | 18 | 19 | 20 | 21 | goosh.command = function(){ 22 | var cmdpar = goosh.gui.inputfield.value; 23 | 24 | var tokens = cmdpar.split(" "); 25 | var args = new Array(); 26 | 27 | 28 | for(i=0; i"; // debug 66 | 67 | var cmdstrnew = args.join(" "); 68 | 69 | if(encodeURIComponent(cmdstrnew) != goosh.lib.get("q") && cmdstrnew != "more" && cmdstrnew != "logout") 70 | window.location.hash = "#"+encodeURIComponent(cmdstrnew); 71 | 72 | goosh.gui.out("
"+goosh.gui.prompt+""+cmdstrnew.replace(/"); 73 | if(cmdstrnew != "") { 74 | goosh.keyboard.hist[goosh.keyboard.hist.length] = cmdstrnew; 75 | goosh.keyboard.histpos = goosh.keyboard.hist.length; 76 | } 77 | 78 | 79 | var cmd = ""; 80 | 81 | if(!searcher) { 82 | searcher = goosh.modules.list[goosh.config.mode]; // default searcher = mode 83 | } 84 | else { 85 | for(i=0; i0) this.config.moreobj = searcher; 91 | 92 | if(args.length == 0 && searcher.mode) { 93 | goosh.config.mode = searcher.name; 94 | goosh.gui.updateprompt(); 95 | } 96 | else{ 97 | searcher.call(args); 98 | } 99 | 100 | goosh.gui.scroll(); 101 | goosh.gui.inputfield.value = ''; 102 | 103 | goosh.gui.focusinput(); 104 | 105 | return false; 106 | } 107 | 108 | 109 | 110 | goosh.onload = function(e,username) { 111 | 112 | var ifrlogin =false; 113 | 114 | try{ 115 | if(parent.goosh != goosh) { 116 | var bodyel = document.getElementById('body'); 117 | bodyel.innerHTML = ""; 118 | goosh=parent.goosh; 119 | ifrlogin = true; 120 | } 121 | } 122 | catch(e){} 123 | 124 | 125 | goosh.gui.init(); 126 | 127 | if(!username && (ifrlogin || document.cookie.indexOf("loggedin") != -1)){ 128 | goosh.ajax.query("http://goosh.appspot.com/status?callback=goosh.onload"); 129 | return; 130 | } 131 | else { 132 | if(goosh.ajax.iscontext(e)) { 133 | goosh.config.user = username; 134 | //try { 135 | var d = goosh.gui.el("gooshlogin"); 136 | var p = goosh.gui.el("gooshloginparent"); 137 | if(d && p) { goosh.gui.outputel.removeChild(goosh.gui.outputel.lastChild);} 138 | // } 139 | // catch(e){} 140 | } 141 | } 142 | 143 | if(username && username != "guest") goosh.lib.cookie.set("loggedin","1",365); 144 | 145 | 146 | goosh.set.init(); 147 | 148 | 149 | 150 | 151 | } 152 | 153 | goosh.getquery = function(){ 154 | var query = "" 155 | if(goosh.lib.get("q")) {query = goosh.lib.get("q");} //{window.location.href="http://gshell.grothkopp.com/#"+goosh.lib.get("q"); return;} //query = decodeURI(goosh.lib.get("q")); 156 | if(window.location.hash) query = decodeURIComponent(window.location.hash.substr(1)); 157 | query +=" "; 158 | 159 | if(query != " " && query.substr(0,6) != "login " && query.substr(0,4) != "set " && query.substr(0,9) != "settings ") 160 | goosh.gui.inputfield.value = query.substr(0,query.length); //.replace(/ 11 | 12 | 13 | 14 | Array.prototype.in_array = function (elem) { 15 | var i; 16 | for (i = 0; i < this.length; i++) { 17 | if (this[i] == elem) { 18 | return true; 19 | } 20 | } 21 | return false; 22 | }; 23 | 24 | function yield(){ 25 | if(cmdqueue.length >0) command(cmdqueue.pop()); 26 | } 27 | 28 | 29 | var searchers = new Array(); 30 | 31 | 32 | function search_base(){ 33 | 34 | this.mode = false; 35 | // this.more = false; 36 | this.parameters = ""; 37 | this.help = "no helptext yet."; 38 | this.helptext = ""; 39 | this.hasmore = false; 40 | 41 | } 42 | 43 | function register_searcher(name,base){ 44 | if(!base) base = "base"; 45 | eval("search_"+name+".prototype = new search_"+base+"();"+ 46 | "searchers_"+name+" = new search_"+name+"();"+ 47 | 'searchers["'+name+'"] = searchers_'+name+";"); 48 | } 49 | 50 | 64 | 65 | 66 | 67 | 68 | function command(cmdpar){ 69 | var cmdstr =""; 70 | 71 | if(!cmdpar && cmdpar != ""){ 72 | var cmdstri = document.f.q.value; 73 | var cmdstrs = cmdstri.split(";"); 74 | 75 | cmdqueue = new Array(); 76 | if(cmdstrs.length>1){ 77 | 78 | for(ii=0;ii"; // debug 131 | 132 | var cmdstrnew = args.join(" "); 133 | 134 | output.innerHTML += "
"+cmdprompt+""+cmdstrnew+"
"; 135 | if(cmdstrnew != "") { 136 | hist[hist.length] = cmdstrnew; 137 | histpos = hist.length; 138 | } 139 | 140 | 141 | var cmd = ""; 142 | 143 | if(!searcher) { 144 | searcher = searchers[mode]; // default searcher = mode 145 | } 146 | else { 147 | for(i=0; i0) moreobj = searcher; 153 | 154 | if(args.length == 0 && searcher.mode) { 155 | mode = searcher.name; 156 | cmdprompt = user+"@"+host+":/"+mode+pend; 157 | promptel.innerHTML = cmdprompt; 158 | } 159 | else{ 160 | searcher.call(args); 161 | } 162 | 163 | window.scrollBy(0, 500); 164 | document.f.q.value = ''; 165 | 166 | focusinput(); 167 | 168 | return false; 169 | } 170 | 171 | 172 | 173 | goosh.onload = function () { 174 | 175 | goosh.gui.init(); 176 | 177 | goosh.gui.updateprompt(); 178 | goosh.gui.focusinput(); 179 | 180 | if(goosh.gui.inputfield.value != "") goosh.command(); 181 | } 182 | 183 | -------------------------------------------------------------------------------- /goosh/gui/gui.js: -------------------------------------------------------------------------------- 1 | goosh.lib.namespace("goosh.gui"); 2 | 3 | 4 | goosh.gui.inputel = false; 5 | goosh.gui.outputel = false; 6 | goosh.gui.promptel = false; 7 | 8 | goosh.gui.inputfield = false; 9 | goosh.gui.bodyel = false; 10 | goosh.gui.headel = false; 11 | 12 | goosh.gui.el = function(id){ 13 | return document.getElementById(id); 14 | } 15 | 16 | 17 | goosh.gui.init = function(){ 18 | 19 | goosh.gui.inputel = document.getElementById('input'); 20 | goosh.gui.outputel = document.getElementById('output'); 21 | goosh.gui.promptel = document.getElementById('prompt'); 22 | goosh.gui.inputfield = document.getElementById('inputfield'); 23 | goosh.gui.bodyel = document.getElementById('body'); 24 | goosh.gui.headel = document.getElementById('head'); 25 | 26 | 27 | if(goosh.gui.inputfield.createTextRange) { 28 | goosh.gui.inputfield.onkeyup= new Function("return goosh.keyboard.mcursor(event);"); 29 | goosh.gui.bodyel.onfocus = new Function("return goosh.gui.focusinput(event);"); 30 | goosh.gui.bodyel.onclick = new Function("return goosh.gui.focusinput(event);"); 31 | goosh.gui.bodyel.onkeydown = new Function("return goosh.keyboard.keyDownHandler(event);"); 32 | } else { 33 | goosh.gui.inputfield.onkeyup= goosh.keyboard.mcursor; 34 | goosh.gui.bodyel.onfocus = goosh.gui.focusinput; 35 | goosh.gui.bodyel.onclick = goosh.gui.focusinput; 36 | goosh.gui.bodyel.onkeydown = goosh.keyboard.keyDownHandler; 37 | } 38 | 39 | } 40 | 41 | 42 | // input / output functions 43 | 44 | goosh.gui.error = function(text){ 45 | goosh.ajax.stopall(); 46 | 47 | goosh.gui.out("Error: "+text+"

"); 48 | goosh.gui.showinput(); 49 | goosh.gui.focusinput(); 50 | goosh.gui.scroll(); 51 | } 52 | 53 | 54 | 55 | goosh.gui.outln = function(text){ 56 | goosh.gui.out(text+"
"); 57 | } 58 | 59 | goosh.gui.out = function(text){ 60 | //goosh.gui.outputel.innerHTML += text; 61 | var div = document.createElement("div"); 62 | div.innerHTML = text; 63 | goosh.gui.outputel.appendChild(div); 64 | return div; 65 | } 66 | 67 | goosh.gui.css = function(file){ 68 | //goosh.gui.outputel.innerHTML += text; 69 | var style = document.createElement("link"); 70 | style.href = file; 71 | style.rel= "stylesheet"; 72 | style.type = "text/css"; 73 | goosh.gui.bodyel.appendChild(style); 74 | return style; 75 | } 76 | 77 | 78 | goosh.gui.less = function(text){ 79 | return ""+text+""; 80 | } 81 | 82 | goosh.gui.info = function(text){ 83 | return ""+text+""; 84 | } 85 | 86 | goosh.gui.clear = function(){ 87 | goosh.gui.outputel.innerHTML = ""; 88 | } 89 | 90 | goosh.gui.showinput = function(){ 91 | goosh.gui.inputel.style['display'] = 'block'; 92 | } 93 | 94 | goosh.gui.hideinput = function(){ 95 | goosh.gui.inputel.style['display'] = 'none'; 96 | } 97 | 98 | goosh.gui.focusinput = function(){ 99 | var txt = ""; 100 | //if (document.getSelection) txt = document.getSelection(); 101 | if (document.selection) txt = document.selection.createRange().text; 102 | else if (window.getSelection) txt = window.getSelection().toString(); 103 | 104 | if(txt.length == 0){ 105 | 106 | document.f.q.value = document.f.q.value; // for safari 107 | if(goosh.gui.inputel.style['display'] != 'none') document.f.q.focus(); 108 | } 109 | } 110 | 111 | goosh.gui.updateprompt = function(){ 112 | goosh.gui.prompt = goosh.config.user+"@"+goosh.config.host+":/"+goosh.config.mode+goosh.config.pend; 113 | goosh.gui.promptel.innerHTML = goosh.gui.prompt; 114 | } 115 | 116 | goosh.gui.scroll = function(){ 117 | window.scrollBy(0, 122500); 118 | } 119 | 120 | goosh.gui.setstyle = function(ele,prop,val){ 121 | try{ 122 | var el = goosh.gui.el(ele); 123 | el.style[prop] = val; 124 | return true; 125 | } 126 | catch(e){ 127 | return false; 128 | } 129 | 130 | } 131 | 132 | goosh.gui.setstyleclass = function(classname,style){ 133 | //goosh.gui.outputel.innerHTML += text; 134 | var div = document.createElement("div"); 135 | var out = "
"; 136 | div.innerHTML = out; 137 | goosh.gui.bodyel.appendChild(div); 138 | 139 | } 140 | 141 | 142 | -------------------------------------------------------------------------------- /goosh/lang/lang.js: -------------------------------------------------------------------------------- 1 | goosh.lib.namespace("goosh.lang"); 2 | 3 | goosh.lang.list = { 4 | 'arabic' : 'ar', 5 | 'bulgarian' : 'bg', 6 | 'catalan' : 'ca', 7 | 'chinese' : 'zh', 8 | 'chinese_simplified' : 'zh-cn', 9 | 'chinese_traditional' : 'zh-tw', 10 | 'croatian' : 'hr', 11 | 'czech' : 'cs', 12 | 'danish' : 'da', 13 | 'dutch': 'nl', 14 | 'english' : 'en', 15 | 'estonian' : 'et', 16 | 'filipino' : 'tl', 17 | 'finnish' : 'fi', 18 | 'french' : 'fr', 19 | 'german' : 'de', 20 | 'greek' : 'el', 21 | 'hebrew' : 'iw', 22 | 'hindi' : 'hi', 23 | 'hungarian' : 'hu', 24 | 'indonesian' : 'id', 25 | 'italian' : 'it', 26 | 'japanese' : 'ja', 27 | 'korean' : 'ko', 28 | 'latvian' : 'lv', 29 | 'lithuanian' : 'lt', 30 | 'norwegian' : 'no', 31 | 'persian' : 'fa', 32 | 'polish' : 'pl', 33 | 'portuguese' : 'pt', 34 | 'romanian' : 'ro', 35 | 'russian' : 'ru', 36 | 'serbian' : 'sr', 37 | 'slovak' : 'sk', 38 | 'slovenian' : 'sl', 39 | 'spanish' : 'es', 40 | 'swedish' : 'sv', 41 | 'thai' : 'th', 42 | 'turkish' : 'tr', 43 | 'ukrainian' : 'uk', 44 | 'vietnamese' : 'vi' 45 | }; 46 | 47 | goosh.lang.reverse = new Object(); 48 | for(key in goosh.lang.list) goosh.lang.reverse[goosh.lang.list[key]] =key; 49 | -------------------------------------------------------------------------------- /goosh/lib/chop.js: -------------------------------------------------------------------------------- 1 | goosh.lib.chop = function(text){ 2 | 3 | if(text) 4 | while(text.charAt(0) == " ") text = text.substr(1); 5 | 6 | return text; 7 | } 8 | -------------------------------------------------------------------------------- /goosh/lib/cookie.js: -------------------------------------------------------------------------------- 1 | goosh.lib.namespace("goosh.lib.cookie"); 2 | 3 | goosh.lib.cookie.list = new Object(); 4 | 5 | /* 6 | goosh.lib.cookie.fetch = function(context,result){ 7 | 8 | goosh.lib.cookie.getfromstr(document.cookie); 9 | 10 | if(goosh.config.user != "guest") { 11 | if(!context) { 12 | goosh.ajax.query("http://goosh.appspot.com/cookie?callback=goosh.lib.cookie.fetch"); 13 | } 14 | else if(goosh.ajax.iscontext(context)){ 15 | 16 | //alert(result); 17 | 18 | goosh.lib.cookie.getfromstr(result,true); 19 | 20 | } 21 | 22 | } 23 | return goosh.lib.cookie.list; 24 | } 25 | */ 26 | 27 | goosh.lib.cookie.getfromstr = function(str,update){ 28 | var ca = str.split(';'); 29 | 30 | for(var i=0;i < ca.length;i++) { 31 | var pair = ca[i].split("="); 32 | var key = goosh.lib.chop(pair[0]); 33 | var val = goosh.lib.chop(pair[1]); 34 | if(update && goosh.lib.cookie.list[key] != val){ 35 | goosh.lib.cookie.set(key,val,365); 36 | } 37 | goosh.lib.cookie.list[key] = val; 38 | } 39 | } 40 | 41 | 42 | goosh.lib.cookie.get = function(name) { 43 | return goosh.lib.cookie.list[name]; 44 | } 45 | 46 | 47 | 48 | goosh.lib.cookie.set = function(name,val,days) { 49 | 50 | var duration = new Date(); 51 | var timespan = duration.getTime() + (days * 24 * 60 * 60 * 1000); 52 | duration.setTime(timespan); 53 | 54 | document.cookie = name+"="+val+"; expires=" + duration.toGMTString(); 55 | 56 | if(goosh.config.user != "guest" && name != "loggedin") { 57 | var del = ""; 58 | if(days<0) {del= "&del=1"; } 59 | goosh.ajax.query("http://goosh.appspot.com/cookie?key="+encodeURIComponent(name)+"&val="+encodeURIComponent(val)+"&callback=goosh.lib.cookie.fetch"+del,true); 60 | } 61 | 62 | goosh.lib.cookie.list[name] = val; 63 | return val; 64 | } 65 | 66 | 67 | goosh.lib.cookie.del = function(name) { 68 | 69 | goosh.lib.cookie.set(name,"",-100); 70 | 71 | goosh.lib.cookie.list[name] = null; 72 | 73 | } 74 | 75 | 76 | goosh.lib.cookie.getall = function(){ 77 | return goosh.lib.cookie.list; 78 | } 79 | -------------------------------------------------------------------------------- /goosh/lib/dump.js: -------------------------------------------------------------------------------- 1 | function dump(arr,level) { 2 | var dumped_text = ""; 3 | if(!level) level = 0; 4 | 5 | //The padding given at the beginning of the line. 6 | var level_padding = ""; 7 | for(var j=0;j \"" + value + "\"\n"; 18 | } 19 | } 20 | } else { //Stings/Chars/Numbers etc. 21 | dumped_text = "===>"+arr+"<===("+typeof(arr)+")"; 22 | } 23 | return dumped_text; 24 | } 25 | 26 | 27 | -------------------------------------------------------------------------------- /goosh/lib/get.js: -------------------------------------------------------------------------------- 1 | goosh.lib.namespace("goosh.lib"); 2 | 3 | goosh.lib.get = function(name){ 4 | name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); 5 | var regexS = "[\\?&]"+name+"=([^&#]*)"; 6 | var regex = new RegExp( regexS ); 7 | var results = regex.exec( window.location.href ); 8 | if( results == null ) 9 | return ""; 10 | else 11 | return decodeURIComponent(results[1]).replace(/\+/g," "); 12 | } 13 | -------------------------------------------------------------------------------- /goosh/lib/in_array.js: -------------------------------------------------------------------------------- 1 | goosh.lib.in_array = function (arr,elem) { 2 | var i; 3 | for (i = 0; i < arr.length; i++) { 4 | if (arr[i] == elem) { 5 | return true; 6 | } 7 | } 8 | return false; 9 | }; 10 | 11 | -------------------------------------------------------------------------------- /goosh/lib/keyboard.js: -------------------------------------------------------------------------------- 1 | goosh.lib.namespace("goosh.keyboard"); 2 | 3 | goosh.keyboard.suggestions = new Array(); 4 | goosh.keyboard.suggpos = 1; 5 | goosh.keyboard.suggword =""; 6 | 7 | goosh.keyboard.hist = new Array(); 8 | goosh.keyboard.histpos = 0; 9 | goosh.keyboard.histtemp = 0; 10 | 11 | 12 | goosh.keyboard.suggest = function(word){ 13 | 14 | if(goosh.keyboard.suggpos > goosh.keyboard.suggestions[word].length) goosh.keyboard.suggpos =1; 15 | 16 | if(goosh.keyboard.suggestions[word][goosh.keyboard.suggpos]) 17 | goosh.gui.inputfield.value = goosh.keyboard.suggestions[word][goosh.keyboard.suggpos]; 18 | 19 | var d= goosh.gui.inputfield; 20 | if(d.createTextRange){ 21 | var t=d.createTextRange(); 22 | t.moveStart("character",word.length); 23 | t.select() 24 | } else if (d.setSelectionRange){ 25 | d.setSelectionRange(word.length,d.value.length) 26 | } 27 | 28 | } 29 | 30 | 31 | // evil hack for suggest 32 | goosh.keyboard.dummyac = function() { 33 | 34 | this.Suggest_apply = function(el,text,sug,temp){ 35 | 36 | goosh.keyboard.suggestions[text] = sug; 37 | goosh.keyboard.suggest(text); 38 | return true; 39 | } 40 | 41 | }; 42 | 43 | window.googlesug = new Array(); 44 | 45 | window.googlesug.ac = new goosh.keyboard.dummyac(); 46 | 47 | 48 | goosh.keyboard.keyDownHandler = function(event){ 49 | if(!event&&window.event) { 50 | event=window.event; 51 | } 52 | if(event) { 53 | _lastKeyCode=event.keyCode; 54 | } 55 | 56 | // We are backspacing here... 57 | if(event&&event.keyCode==9){ 58 | event.cancelBubble=true; 59 | event.returnValue=false; 60 | // tab = 9, backsp = 8, ctrl =17, r = 82 61 | //output.innerHTML += event.keyCode+"
"; 62 | 63 | var word = goosh.keyboard.suggword; 64 | 65 | if(word !=""){ 66 | if(!goosh.keyboard.suggestions[word]){ 67 | goosh.keyboard.suggpos = 1; 68 | // output.innerHTML += "query
"; 69 | var script = document.createElement('script'); 70 | document.body.appendChild(script); 71 | script.src = "http://www.google.com/complete/search?hl="+goosh.config.lang+"&js=true&qu="+encodeURIComponent(word); 72 | } 73 | else{ 74 | goosh.keyboard.suggpos +=2; 75 | goosh.keyboard.suggest(word); 76 | } 77 | } 78 | return false 79 | } 80 | } 81 | 82 | 83 | 84 | goosh.keyboard.mcursor = function(e){ 85 | var keycode=e.keyCode; 86 | 87 | 88 | if(goosh.keyboard.hist.length>0){ 89 | if(keycode==38 || keycode==40){ 90 | 91 | if(goosh.keyboard.hist[goosh.keyboard.histpos]) { 92 | goosh.keyboard.hist[goosh.keyboard.histpos] = goosh.gui.inputfield.value; 93 | } 94 | else 95 | goosh.keyboard.histtemp = goosh.gui.inputfield.value; 96 | } 97 | 98 | if(keycode==38){ // up 99 | goosh.keyboard.histpos--; 100 | if(goosh.keyboard.histpos<0) goosh.keyboard.histpos =0; 101 | 102 | } 103 | else if(keycode==40){ //down 104 | 105 | goosh.keyboard.histpos++; 106 | if(goosh.keyboard.histpos > goosh.keyboard.hist.length) 107 | goosh.keyboard.histpos = goosh.keyboard.hist.length; 108 | } 109 | 110 | if(keycode==38 || keycode==40){ 111 | 112 | if(goosh.keyboard.hist[goosh.keyboard.histpos]) 113 | goosh.gui.inputfield.value = goosh.keyboard.hist[goosh.keyboard.histpos]; 114 | else 115 | goosh.gui.inputfield.value = goosh.keyboard.histtemp; 116 | 117 | } 118 | 119 | } 120 | 121 | if(keycode!=9 && keycode !=13) 122 | goosh.keyboard.suggword = goosh.gui.inputfield.value; 123 | 124 | if(keycode==13){ 125 | goosh.command(); 126 | } 127 | } 128 | 129 | 130 | -------------------------------------------------------------------------------- /goosh/lib/namespace.js: -------------------------------------------------------------------------------- 1 | 2 | // thanks to Michael Schwarz for this function 3 | goosh.lib.namespace = function (ns) 4 | { 5 | var parts = ns.split("."); 6 | var root = window; 7 | 8 | for(var i=0; i"); 13 | goosh.gui.out(""); 14 | //goosh.gui.out(""); 15 | else 16 | goosh.gui.out(""); 17 | 18 | 19 | } 20 | 21 | } 22 | goosh.modules.register("gmail"); 23 | 24 | 25 | -------------------------------------------------------------------------------- /goosh/mod-alt/images.js: -------------------------------------------------------------------------------- 1 | 2 | goosh.module.images = function(){ 3 | this.name = "images"; 4 | this.aliases = new Array("images","image","i"); 5 | this.mode = true; 6 | this.help = "google image search"; 7 | this.helptext = "examples:
"+ 8 | "images foo bar - searches for "foo bar" images
"; 9 | 10 | } 11 | goosh.modules.register("images","web"); 12 | 13 | -------------------------------------------------------------------------------- /goosh/mod-alt/login.js: -------------------------------------------------------------------------------- 1 | 2 | goosh.module.login = function(){ 3 | this.name = "login"; 4 | this.aliases = new Array("login"); 5 | 6 | this.help = "login with your google account *"; 7 | this.helptext = "goosh sees only your username"; 8 | this.parameters = ""; 9 | 10 | 11 | this.cb = function(context,username){ 12 | if(goosh.ajax.iscontext(context)){ 13 | if(username && username != "guest") goosh.lib.cookie.set("loggedin","1",365); 14 | 15 | goosh.config.user = username; 16 | if(goosh.config.user != "guest"){ 17 | goosh.gui.outln("You're logged in as: "+goosh.config.user+"
"); 18 | goosh.set.init(); 19 | 20 | goosh.gui.updateprompt(); 21 | goosh.gui.showinput(); 22 | goosh.gui.focusinput(); 23 | goosh.gui.scroll(); 24 | 25 | } 26 | else 27 | goosh.ajax.query("http://goosh.appspot.com/dologin?"); 28 | 29 | 30 | goosh.gui.showinput(); 31 | goosh.gui.focusinput(); 32 | goosh.gui.scroll(); 33 | 34 | 35 | } 36 | } 37 | 38 | this.call = function(args){ 39 | 40 | goosh.ajax.query("http://goosh.appspot.com/status?callback=goosh.modobj.login.cb"); 41 | 42 | } 43 | 44 | } 45 | goosh.modules.register("login"); 46 | 47 | 48 | -------------------------------------------------------------------------------- /goosh/mod-alt/logout.js: -------------------------------------------------------------------------------- 1 | 2 | goosh.module.logout = function(){ 3 | this.name = "logout"; 4 | this.aliases = new Array("logout"); 5 | 6 | this.help = "log out of goosh *"; 7 | this.helptext = ""; 8 | 9 | this.call = function(args){ 10 | goosh.ajax.query("http://goosh.appspot.com/dologout?"); 11 | if(goosh.ajax.iscontext(goosh.ajax.lastcontext)){ 12 | goosh.config.user = "guest"; 13 | goosh.lib.cookie.del("loggedin"); 14 | goosh.gui.updateprompt(); 15 | goosh.gui.showinput(); 16 | goosh.gui.focusinput(); 17 | goosh.gui.scroll(); 18 | 19 | } 20 | 21 | } 22 | 23 | } 24 | goosh.modules.register("logout"); 25 | 26 | 27 | -------------------------------------------------------------------------------- /goosh/mod-alt/place.js: -------------------------------------------------------------------------------- 1 | 2 | goosh.module.place = function(){ 3 | this.name = "place"; 4 | this.aliases = new Array("places","place","map","p"); 5 | this.mode = true; 6 | this.start = 0; 7 | this.args =""; 8 | 9 | this.parameters = "[address]"; 10 | this.help = "google maps search"; 11 | this.helptext = "examples:
"+ 12 | "place New York - show new york in a map
"; 13 | 14 | this.query = function(cmdstr,query) { 15 | 16 | goosh.ajax.query("http://maps.google.com/maps/geo?q="+encodeURIComponent(query)+"&output=json&callback=goosh.modobj."+this.name+".render&key="+goosh.config.apikey+"&lang="+goosh.config.lang); 17 | 18 | } 19 | 20 | 21 | 22 | this.call = function(args){ 23 | if(args.length > 0) 24 | this.start = 0; 25 | this.results = new Array(); 26 | this.args = args.join(" "); 27 | this.query(this.name,args.join(" ")); 28 | } 29 | 30 | 31 | this.render = function(results){ 32 | if(goosh.ajax.iscontext(goosh.ajax.lastcontext)){ 33 | 34 | if(results && results.Placemark){ 35 | results.results = new Array(); 36 | 37 | for(i=0;i= 4) detail = 10; 45 | if(acc >= 6) detail = 14; 46 | results.results[i] = new Array(); 47 | results.results[i].title = r.address; 48 | results.results[i].unescapedUrl = "http://maps.google.com/maps?f=q&hl="+goosh.config.lang+"&q="+encodeURIComponent(r.address)+"¢er="+r.Point.coordinates[1]+","+r.Point.coordinates[0]+"&zoom="+(detail); 49 | results.results[i].content = ""; 50 | results.results[i].thumb = ""; 51 | } 52 | 53 | 54 | } 55 | 56 | this.hasmore = true; 57 | this.results = results.results; 58 | this.renderResult(goosh.ajax.lastcontext, results); 59 | } 60 | else { 61 | goosh.gui.error("Place ""+this.args+"" not found."); 62 | } 63 | 64 | if(this.results.length <= this.start+ parseInt(goosh.config.numres)){ 65 | this.hasmore = false; 66 | moreobj = false; 67 | 68 | } 69 | 70 | 71 | goosh.gui.showinput(); 72 | goosh.gui.focusinput(); 73 | goosh.gui.scroll(); 74 | } 75 | 76 | return true; 77 | } 78 | 79 | this.more = function(){ 80 | if(this.args){ 81 | this.start += parseInt(goosh.config.numres); 82 | //this.query(this.name,this.args); 83 | 84 | if(this.results.length <= this.start+ parseInt(goosh.config.numres)){ 85 | this.hasmore = false; 86 | moreobj = false; 87 | 88 | } 89 | this.renderResult(); 90 | 91 | } 92 | 93 | } 94 | 95 | 96 | } 97 | goosh.modules.register("place","web"); 98 | 99 | 100 | -------------------------------------------------------------------------------- /goosh/mod-alt/translate.js: -------------------------------------------------------------------------------- 1 | 2 | goosh.module.translate = function(){ 3 | this.name = "translate"; 4 | this.aliases = new Array("translate","trans","t"); 5 | this.mode = true; 6 | this.args =""; 7 | 8 | this.parameters = "[lang1] [lang2] <words>"; 9 | this.help = "google translation"; 10 | this.helptext = "examples:
"+ 11 | "translate en de What time is it? - translate "What time is it?" from english to german
"+ 12 | "translate fr What time is it? - translate "What time is it?" to french
"+ 13 | "translate Wie spät ist es? - translates "Wie spät ist es?" to your default language. language of text will be guessed.
"; 14 | 15 | this.query = function(cmdstr,args) { 16 | 17 | goosh.ajax.query("http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q="+encodeURIComponent(this.text)+"&langpair="+this.lang1+"%7C"+this.lang2+"&callback=goosh.modobj."+this.name+".render"+'&key='+goosh.config.apikey); 18 | } 19 | 20 | this.guess = function(text) { 21 | 22 | goosh.ajax.query("http://ajax.googleapis.com/ajax/services/language/detect?v=1.0&q="+encodeURIComponent(text)+"&callback=goosh.modobj."+this.name+".guessresult"+'&key='+goosh.config.apikey); 23 | } 24 | 25 | 26 | this.guessresult = function(context, results, status, details, unused){ 27 | if(goosh.ajax.iscontext(context)){ 28 | if(results){ 29 | if(results.language){ 30 | this.lang1 = results.language; 31 | if(!this.lang2) this.lang2 = goosh.config.lang; 32 | 33 | this.query(); 34 | 35 | }else{ 36 | goosh.gui.error("could not guess language."); 37 | } 38 | } 39 | } 40 | 41 | 42 | 43 | } 44 | 45 | this.renderResult = function(context, results, status, details, unused){ 46 | var out = ""; 47 | var rnum = this.start; 48 | if(goosh.ajax.iscontext(context)){ 49 | if(results){ 50 | if(results.translatedText){ 51 | goosh.gui.outln("translating ""+this.text+"" from "+goosh.gui.info(goosh.lang.reverse[this.lang1])+" to "+goosh.gui.info(goosh.lang.reverse[this.lang2])+":"); 52 | goosh.gui.outln(''); 53 | goosh.gui.outln(goosh.gui.info("""+results.translatedText+""")); 54 | goosh.gui.outln(''); 55 | }else{ 56 | goosh.gui.error("no translation found."); 57 | } 58 | } 59 | 60 | 61 | goosh.gui.showinput(); 62 | goosh.gui.focusinput(); 63 | goosh.gui.scroll(); 64 | } 65 | } 66 | 67 | 68 | 69 | this.call = function(args){ 70 | this.args = args; 71 | this.lang1 = false; 72 | this.lang2 = false; 73 | 74 | if(args.length > 2 && (goosh.lang.list[args[0]] || goosh.lang.reverse[args[0]]) && (goosh.lang.list[args[1]] || goosh.lang.reverse[args[1]])){ 75 | 76 | if(goosh.lang.list[args[0]]) 77 | this.lang1 = goosh.lang.list[args[0]]; 78 | else 79 | this.lang1 = args[0]; 80 | 81 | if(goosh.lang.list[args[1]]) 82 | this.lang2 = goosh.lang.list[args[1]]; 83 | else 84 | this.lang2 = args[1]; 85 | 86 | this.text = args[2]; 87 | for(i=3;ivideo foo bar - searches for "foo bar" videos
"; 11 | 12 | 13 | } 14 | goosh.modules.register("video","web"); 15 | 16 | 17 | -------------------------------------------------------------------------------- /goosh/module-exp/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grothkopp/goosh/221ae50a1f2251b74cb1d18ad6d7b54112daf62e/goosh/module-exp/.gitkeep -------------------------------------------------------------------------------- /goosh/module/addengine.js: -------------------------------------------------------------------------------- 1 | 2 | goosh.module.addengine = function(){ 3 | this.name = "addengine"; 4 | this.aliases = new Array("addengine"); 5 | this.help = "add goosh to firefox search box"; 6 | 7 | this.call = function(args){ 8 | engineURL ="http://gshell.grothkopp.com/goosh.xml"; 9 | if (!document.all && window.external && ("AddSearchProvider" in window.external)) { 10 | window.external.AddSearchProvider(engineURL); 11 | } else { 12 | goosh.gui.error("addengine will only work in Firefox-Browsers."); 13 | } 14 | } 15 | 16 | 17 | } 18 | goosh.modules.register("addengine"); 19 | 20 | 21 | -------------------------------------------------------------------------------- /goosh/module/amazon.js: -------------------------------------------------------------------------------- 1 | goosh.module.amazon = function(){ 2 | this.name = "amazon"; 3 | this.aliases = new Array("amazon","am"); 4 | this.mode = true; 5 | this.help = "amazon search"; 6 | this.helptext = "examples:
"+ 7 | "amazon foo bar - searches "foo bar" on amazon
"; 8 | 9 | 10 | } 11 | goosh.modules.register("amazon","web"); 12 | 13 | 14 | -------------------------------------------------------------------------------- /goosh/module/blogs.js: -------------------------------------------------------------------------------- 1 | 2 | goosh.module.blogs = function(){ 3 | this.name = "blogs"; 4 | this.aliases = new Array("blogs","blog","b"); 5 | this.mode = true; 6 | 7 | this.parameters = "[keywords]"; 8 | this.help = "google blog search"; 9 | this.helptext = "examples:
"+ 10 | "blog foo bar - searches for "foo bar" blogs
"; 11 | 12 | } 13 | 14 | goosh.modules.register("blogs","web"); 15 | 16 | 17 | -------------------------------------------------------------------------------- /goosh/module/calc.js: -------------------------------------------------------------------------------- 1 | 2 | goosh.module.calculate = function(){ 3 | this.name = "calculate"; 4 | this.aliases = new Array("calculate","calc"); 5 | 6 | this.help = "evaluate a mathematical expression"; 7 | this.parameters = "[mathematical expression]"; 8 | 9 | this.call = function(args){ 10 | 11 | var out =""; 12 | 13 | var exp = args.join(" "); 14 | var expin = exp; 15 | 16 | if(exp.match(/^[0-9\+\-\/\*\. \^\(\)]+$/)){ 17 | 18 | exp = exp.replace(/([0-9]+)\^([0-9]+)/g, "Math.pow($1,$2)"); 19 | 20 | goosh.gui.outln(expin+" = "+eval(exp)); 21 | } 22 | else{ 23 | goosh.gui.error("could not calculate that."); 24 | return false; 25 | } 26 | 27 | } 28 | 29 | } 30 | goosh.modules.register("calculate"); 31 | 32 | 33 | -------------------------------------------------------------------------------- /goosh/module/cd.js: -------------------------------------------------------------------------------- 1 | 2 | goosh.module.cd = function(){ 3 | this.name = "cd"; 4 | this.aliases = new Array("cd"); 5 | this.parameters = "<command>"; 6 | this.help = "change mode"; 7 | this.helptext = "This exists just for convenience. Use <command> without parameters instead.
"; 8 | 9 | this.call = function(args){ 10 | if(!args[0]) args[0] = goosh.config.mode; 11 | if(args[0] && args[0] =="..") args[0] = "web"; 12 | 13 | if(args[0] && goosh.modules.list[args[0]] && goosh.modules.list[args[0]].mode){ 14 | var searcher = goosh.modules.list[args[0]]; 15 | 16 | goosh.config.mode = searcher.name; 17 | goosh.gui.updateprompt(); 18 | 19 | } 20 | else{ 21 | goosh.gui.error("command not found or command is not a mode."); 22 | } 23 | } 24 | 25 | 26 | } 27 | goosh.modules.register("cd"); 28 | 29 | 30 | -------------------------------------------------------------------------------- /goosh/module/clear.js: -------------------------------------------------------------------------------- 1 | 2 | goosh.module.clear = function(){ 3 | this.name = "clear"; 4 | this.aliases = new Array("clear","c"); 5 | this.help = "clear the screen"; 6 | 7 | this.call = function(args){ 8 | goosh.gui.clear(); 9 | } 10 | 11 | 12 | } 13 | goosh.modules.register("clear"); 14 | 15 | 16 | -------------------------------------------------------------------------------- /goosh/module/feed.js: -------------------------------------------------------------------------------- 1 | 2 | goosh.module.feeds = function(){ 3 | this.name = "feeds"; 4 | this.aliases = new Array("feeds","feed","f"); 5 | this.mode = true; 6 | this.start = 0; 7 | this.args =""; 8 | 9 | this.parameters = "[keywords]"; 10 | this.help = "google feed search"; 11 | this.helptext = "examples:
"+ 12 | "feed foo bar - searches for "foo bar" feeds
"+ 13 | "read 2 - reads second result
"; 14 | 15 | this.query = function(cmdstr,query) { 16 | 17 | //output.innerHTML += "COMMAND:"+cmdstr+"/"+query+"/"+this.name+".
"; // debug 18 | 19 | 20 | goosh.ajax.query("//ajax.googleapis.com/ajax/services/feed/find?v=1.0&hl="+goosh.config.lang+"&callback=goosh.modobj."+this.name+".render&q="+encodeURIComponent(query)+'&num=100&key'+goosh.config.apikey+"&"); 21 | } 22 | 23 | 24 | 25 | this.call = function(args){ 26 | if(args.length > 0) 27 | this.start = 0; 28 | this.results = new Array(); 29 | this.args = args.join(" "); 30 | this.query(this.name,args.join(" ")); 31 | } 32 | 33 | 34 | this.render = function(context, results, status, details, unused){ 35 | if(goosh.ajax.iscontext(context)){ 36 | 37 | if(results && results.entries && results.entries.length>0){ 38 | results.results = new Array(); 39 | 40 | for(i=0;i"; 36 | if(module.aliases.length >1){ 37 | out += "("; 38 | for(i=0;i"; 31 | if(i==5){ i=0; out += '';} 32 | i++; 33 | } 34 | } 35 | 36 | out += ""; 37 | 38 | 39 | goosh.gui.outln(out); 40 | } 41 | 42 | } 43 | goosh.modules.register("ls"); 44 | 45 | 46 | -------------------------------------------------------------------------------- /goosh/module/lucky.js: -------------------------------------------------------------------------------- 1 | 2 | goosh.module.lucky = function(){ 3 | this.name = "lucky"; 4 | this.aliases = new Array("lucky","l"); 5 | this.mode = false; 6 | 7 | this.parameters = "[keywords]"; 8 | this.help = "go directly to first result"; 9 | this.helptext = "examples:
"+ 10 | "lucky foo bar - goes to first "foo bar" result
"; 11 | 12 | this.call = function(args){ 13 | this.qstart = 0; 14 | if(args.length > 0) 15 | this.query("web",args.join(" ")); 16 | } 17 | 18 | this.render = function(context, results, status, details, unused){ 19 | 20 | if(goosh.ajax.iscontext(context)){ 21 | this.renderResult(context); 22 | 23 | if(results.results[0].unescapedUrl){ 24 | setTimeout('window.location.href = "'+results.results[0].unescapedUrl+'"',0); 25 | } 26 | goosh.gui.showinput(); 27 | goosh.gui.focusinput(); 28 | goosh.gui.scroll(); 29 | 30 | } 31 | } 32 | 33 | } 34 | goosh.modules.register("lucky","web"); 35 | 36 | -------------------------------------------------------------------------------- /goosh/module/more.js: -------------------------------------------------------------------------------- 1 | 2 | goosh.module.more = function(){ 3 | this.name = "more"; 4 | this.aliases = new Array("more","m"); 5 | this.help = "get more results"; 6 | 7 | this.call = function(args){ 8 | if(goosh.config.moreobj && goosh.config.moreobj.hasmore){ 9 | goosh.config.moreobj.more(); 10 | } 11 | } 12 | 13 | 14 | } 15 | goosh.modules.register("more"); 16 | 17 | 18 | -------------------------------------------------------------------------------- /goosh/module/news.js: -------------------------------------------------------------------------------- 1 | 2 | goosh.module.news = function(){ 3 | this.name = "news"; 4 | this.aliases = new Array("news","n"); 5 | this.mode = true; 6 | 7 | this.parameters = "[keywords]"; 8 | this.help = "google news search"; 9 | this.helptext = "examples:
"+ 10 | "blog foo bar - searches for "foo bar" news
"; 11 | 12 | 13 | } 14 | goosh.modules.register("news","web"); 15 | 16 | 17 | -------------------------------------------------------------------------------- /goosh/module/open.js: -------------------------------------------------------------------------------- 1 | 2 | goosh.module.open = function(){ 3 | this.name = "open"; 4 | this.aliases = new Array("open","o"); 5 | this.parameters = "<url>"; 6 | this.help = "open url in new window"; 7 | this.helptext = "examples:
"+ 8 | "open 1 3 - open first and third result from last search
"; 9 | 10 | 11 | this.call = function(args){ 12 | for(i=0;iread reddit.com - read reddit.com-feed
"; 12 | 13 | this.query = function(cmdstr,query) { 14 | 15 | // output.innerHTML += "COMMAND:"+cmdstr+"/"+query+"/"+this.name+".
"; // debug 16 | 17 | goosh.ajax.query("//ajax.googleapis.com/ajax/services/feed/load?v=1.0&hl="+goosh.config.lang+"&callback=goosh.modobj."+this.name+".render&num=100&scoring=h&q="+encodeURIComponent(query)+"&key="+goosh.config.apikey); 18 | } 19 | 20 | this.lookup = function(cmdstr,query) { 21 | 22 | // output.innerHTML += "lookup:"+cmdstr+"/"+query+"/"+this.name+".
"; // debug 23 | 24 | 25 | goosh.ajax.query("//ajax.googleapis.com/ajax/services/feed/lookup?v=1.0&hl="+goosh.config.lang+"&callback=goosh.modobj."+this.name+".lookupdone&q="+encodeURIComponent(query)+"&key="+goosh.config.apikey); 26 | } 27 | 28 | 29 | this.lookupdone = function(context, results, status, details, unused){ 30 | if(results){ 31 | if(results.url){ 32 | if(goosh.ajax.iscontext(context)) 33 | this.query(this.name,results.url); 34 | } 35 | } 36 | else { 37 | goosh.gui.error("feed ""+this.args+"" not found.
Try the "feed"-command to find feeds."); 38 | } 39 | } 40 | 41 | this.call = function(args){ 42 | if(args.length > 0){ 43 | this.start =0; 44 | this.results = new Array(); 45 | this.args = args.join(" "); 46 | this.lookup(this.name,args.join(" ")); 47 | 48 | } 49 | } 50 | 51 | 52 | 53 | this.render = function(context, results, status, details, unused){ 54 | if(goosh.ajax.iscontext(context)){ 55 | 56 | if(results){ 57 | results.results = new Array(); 58 | 59 | for(i=0;i Try the "feed"-command to find feeds."); 84 | } 85 | } 86 | } 87 | 88 | this.more = function(){ 89 | 90 | if(this.args){ 91 | this.start += parseInt(goosh.config.numres); 92 | 93 | if(this.results.length <= this.start + parseInt(goosh.config.numres)){ 94 | this.hasmore = false; 95 | moreobj = false; 96 | 97 | } 98 | 99 | 100 | 101 | this.renderResult(); 102 | 103 | } 104 | 105 | 106 | } 107 | 108 | } 109 | goosh.modules.register("read","web"); 110 | 111 | 112 | -------------------------------------------------------------------------------- /goosh/module/settings.js: -------------------------------------------------------------------------------- 1 | 2 | goosh.module.settings = function(){ 3 | this.name = "settings"; 4 | this.aliases = new Array("settings","set"); 5 | 6 | this.help = "edit settings"; 7 | this.parameters = "[name] [value]"; 8 | 9 | this.helptext = "examples:
"+ 10 | "set lang de - sets language to german
"+ 11 | "set lang - displays value of lang-setting
"+ 12 | "settings - displays all settings
"+ 13 | "settings reset - reset all settings to default values
"; 14 | 15 | 16 | this.call = function(args){ 17 | 18 | var out =""; 19 | 20 | if(args[0] && args[1]){ 21 | if(goosh.set.list[args[0]] && goosh.set.list[args[0]].set(args[1])){ 22 | 23 | if(goosh.set.list[args[0]].get() == goosh.set.list[args[0]].def) 24 | goosh.lib.cookie.del(args[0]); 25 | else 26 | goosh.lib.cookie.set(args[0],goosh.set.list[args[0]].get(),365); 27 | 28 | args[1] =false; 29 | } 30 | else { 31 | goosh.gui.error("Could not set "+args[0]+" to ""+args[1]+"""); 32 | return false; 33 | } 34 | } 35 | 36 | if(args[0] && !args[1]) { 37 | if(args[0] == "reset"){ 38 | for(key in goosh.set.list){ 39 | goosh.set.list[key].set(goosh.set.list[key].def); 40 | goosh.lib.cookie.del(key); 41 | } 42 | out += "Settings where set to default values."; 43 | } 44 | else if(goosh.set.list[args[0]]){ 45 | out += args[0]+" is set to ""+goosh.set.list[args[0]].get()+"".
"; 46 | } 47 | else 48 | goosh.gui.error("No setting with that name."); 49 | } 50 | else{ 51 | out += ""; 52 | out += "" 53 | 54 | for(key in goosh.set.list){ 55 | out += ""; 58 | out += "" 59 | out += "" 60 | out += "" 61 | out += ''; 62 | } 63 | 64 | out += "
namevaluedefaulthelp
"+goosh.set.list[key].get()+""+goosh.set.list[key].def+""+goosh.set.list[key].txt+"
"; 65 | 66 | } 67 | goosh.gui.outln(out); 68 | //alert(document.cookie); 69 | } 70 | 71 | } 72 | goosh.modules.register("settings"); 73 | 74 | 75 | -------------------------------------------------------------------------------- /goosh/module/sponsors.js: -------------------------------------------------------------------------------- 1 | 2 | goosh.module.sponsors = function(){ 3 | this.name = "sponsors"; 4 | this.aliases = new Array("sponsors"); 5 | 6 | this.help = "A list of people who have supported goosh"; 7 | this.parameters = ""; 8 | 9 | this.call = function(args){ 10 | 11 | goosh.gui.outln("A list of people who have supported goosh:"); 12 | goosh.gui.outln(""); 13 | goosh.gui.outln("1. Levonn"); 14 | goosh.gui.outln('2. Your name here? Support goosh (and me) on patreon!'); 15 | goosh.gui.outln(""); 16 | 17 | 18 | } 19 | 20 | } 21 | goosh.modules.register("sponsors"); 22 | 23 | 24 | -------------------------------------------------------------------------------- /goosh/module/web.js: -------------------------------------------------------------------------------- 1 | // goosh web search module 2 | 3 | goosh.module.web = function(){ 4 | this.name = "web"; 5 | this.aliases = new Array("web","search","s","w"); 6 | this.mode = true; 7 | this.start = 0; 8 | this.args =""; 9 | 10 | this.help = "google web search"; 11 | this.parameters = "[keywords]"; 12 | this.helptext = "examples:
"+ 13 | "web foo bar - searches the web for "foo bar"
"; 14 | 15 | // perform the ajax query 16 | this.query = function(cmdstr,query) { 17 | // goosh.ajax.query("//ajax.googleapis.com/ajax/services/search/"+cmdstr+"?v=1.0&start="+this.qstart+"&hl="+goosh.config.lang+"&callback=goosh.modobj."+this.name+".render&q="+encodeURIComponent(query)+'&key='+goosh.config.apikey+"&rsz=large"); 18 | 19 | var customSearchOptions = {}; 20 | customSearchOptions[google.search.Search.RESTRICT_EXTENDED_ARGS] = { 21 | 'lr': 'lang_'+goosh.config.lang 22 | // 'gl': 'date' 23 | }; 24 | cs = new google.search.CustomSearchControl('004431332481073456201:1y01bmxbens', customSearchOptions); 25 | // cs.enableAds('pub-6992080843066528'); 26 | 27 | cs.setResultSetSize(goosh.config.results); 28 | google.search.Csedr.addOverride("mysite_"); 29 | 30 | cs.setSearchStartingCallback(this, function(control, searcher, query) 31 | { 32 | // searcher.setQueryAddition('inurl:' + url); 33 | searcher.setNoHtmlGeneration(); 34 | goosh.gui.hideinput(); 35 | searching = true; 36 | }); 37 | 38 | cs.setSearchCompleteCallback(this, function(control, searcher, query) 39 | { 40 | searching = false; 41 | this.hasmore = true; 42 | goosh.gui.showinput(); 43 | goosh.gui.focusinput(); 44 | goosh.gui.scroll(); 45 | 46 | }); 47 | 48 | 49 | var drawOptions = new google.search.DrawOptions(); 50 | drawOptions.enableSearchResultsOnly(); 51 | 52 | var div = goosh.gui.out(); 53 | 54 | cs.draw(div,drawOptions); 55 | 56 | window.i = ((goosh.config.numres-1) * this.start); 57 | cs.execute(query,this.start+1); 58 | 59 | } 60 | 61 | 62 | // render html output 63 | this.renderResult = function(context, results, status, details, unused){ 64 | var out = ""; 65 | var rnum = this.start; 66 | 67 | out += ""; 68 | 69 | for (i = this.start; i < (this.start + parseInt(goosh.config.numres)); i++) 70 | if(this.results[i]) 71 | { 72 | var r = this.results[i]; 73 | 74 | rnum++; 75 | goosh.config.urls[rnum] = r.unescapedUrl; 76 | r.unescapedUrl = r.unescapedUrl.replace(/"/g,"""); 77 | var url = r.unescapedUrl; 78 | 79 | if(goosh.config.reflink == "on"){ 80 | if(url.match(/\/\/(www.)?amazon.com\//)){ 81 | if(url.indexOf("?")>-1) url += "&"; 82 | else url += "?"; 83 | url += "tag=gc0a18-20"; 84 | } 85 | if(url.match(/\/\/(www.)?amazon.(de|at|es|co.uk)\//)){ 86 | if(url.indexOf("?")>-1) url += "&"; 87 | else url += "?"; 88 | url += "tag=gc06-21"; 89 | } 90 | 91 | goosh.config.urls[rnum] = url; 92 | } 93 | 94 | out += ""; 95 | out += ""; 96 | out += ""; 105 | } 106 | 107 | out += "
  "+rnum+") "; 97 | out += ''+r.title+""; 98 | out += "
"; 99 | out += r.content; 100 | out += "
"; 101 | out += ''+r.unescapedUrl+""; 102 | out += "
"; 103 | //if(r.thumb) out += ''+r.thumb+"
"; 104 | out += " 
"; 108 | 109 | goosh.gui.out(out); 110 | } 111 | 112 | 113 | // perform search 114 | this.call = function(args){ 115 | if(args.length > 0){ 116 | this.start = 0; 117 | this.qstart = 0; 118 | this.results = new Array(); 119 | this.args = args.join(" "); 120 | if(args.length>1 && this.name=="site") { 121 | //this.name = "web"; 122 | this.args = "site:"+this.args; 123 | this.cmd = "web"; 124 | } 125 | else if( this.name=="wiki") { 126 | //this.name = "web"; 127 | this.args = "site:"+goosh.config.lang+".wikipedia.org "+this.args; 128 | this.cmd = "web"; 129 | } 130 | else if( this.name=="amazon") { 131 | //this.name = "web"; 132 | var am = "amazon.com"; 133 | if(goosh.config.lang == "de") am = "amazon.de"; 134 | 135 | this.args = "site:"+am+" "+this.args; 136 | this.cmd = "web"; 137 | } 138 | 139 | else this.cmd = this.name; 140 | 141 | this.query(this.cmd,this.args); 142 | } 143 | } 144 | 145 | 146 | // get more results 147 | this.more = function(){ 148 | if(this.args){ 149 | // this.start += parseInt(goosh.config.numres); 150 | this.start++; 151 | this.qstart = this.results.length; 152 | 153 | if(this.results.length < this.start + parseInt(goosh.config.numres)) 154 | this.query(this.cmd,this.args); 155 | else 156 | this.renderResult(); 157 | 158 | } 159 | } 160 | 161 | 162 | // persoen search and get output 163 | this.render = function(context, results, status, details, unused){ 164 | if(goosh.ajax.iscontext(context)){ 165 | if(results && results.results){ 166 | 167 | for(i=0;i"; 174 | else if(this.name =="video"){ 175 | results.results[i].thumb = "";; 176 | results.results[i].unescapedUrl = r.playUrl; 177 | 178 | } 179 | 180 | this.results.push(results.results[i]); 181 | } 182 | 183 | this.hasmore = true; 184 | 185 | if(results.results.length < 8){ 186 | this.hasmore = false; 187 | moreobj = false; 188 | } 189 | } 190 | else{ 191 | this.hasmore = false; 192 | moreobj = false; 193 | } 194 | 195 | if(this.hasmore && this.results.length < this.start + parseInt(goosh.config.numres)){ 196 | this.qstart = this.results.length; 197 | this.query(this.cmd,this.args); 198 | return 199 | } 200 | 201 | if(results && results.cursor && results.cursor["moreResultsUrl"]) 202 | this.moreresurl = results.cursor["moreResultsUrl"]; 203 | 204 | if(!this.hasmore && this.moreresurl){ 205 | r = new Object(); 206 | 207 | r.title = "More results at google"; 208 | r.unescapedUrl = unescape(this.moreresurl); 209 | r.content = ""; 210 | this.results.push(r); 211 | 212 | } 213 | 214 | this.renderResult(context, results, status, details, unused); 215 | 216 | 217 | goosh.gui.showinput(); 218 | goosh.gui.focusinput(); 219 | goosh.gui.scroll(); 220 | } 221 | } 222 | 223 | } 224 | goosh.modules.register("web"); 225 | 226 | 227 | -------------------------------------------------------------------------------- /goosh/module/wiki.js: -------------------------------------------------------------------------------- 1 | goosh.module.wiki = function(){ 2 | this.name = "wiki"; 3 | this.aliases = new Array("wikipedia","wiki"); 4 | this.mode = true; 5 | this.help = "wikipedia search"; 6 | this.helptext = "examples:
"+ 7 | "wiki foo bar - searches "foo bar" in wikipedia
"; 8 | 9 | 10 | } 11 | goosh.modules.register("wiki","web"); 12 | 13 | 14 | -------------------------------------------------------------------------------- /goosh/modules/modules.js: -------------------------------------------------------------------------------- 1 | goosh.lib.namespace("goosh.modules"); 2 | goosh.lib.namespace("goosh.module"); 3 | goosh.lib.namespace("goosh.modobj"); 4 | 5 | //function yield(){ 6 | // if(cmdqueue.length >0) command(cmdqueue.pop()); 7 | //} 8 | 9 | 10 | goosh.modules.list = new Array(); 11 | 12 | 13 | goosh.module.base = function(){ 14 | 15 | this.mode = false; 16 | // this.more = false; 17 | this.parameters = ""; 18 | this.help = "no helptext yet."; 19 | this.helptext = ""; 20 | this.hasmore = false; 21 | this.results = new Array(); 22 | 23 | } 24 | 25 | goosh.modules.register = function(name,base){ 26 | if(!base) base = "base"; 27 | eval(//"search_"+name+".prototype = new search_"+base+"();"+ 28 | //"searchers_"+name+" = new search_"+name+"();"+ 29 | 'goosh.module.'+name+'.prototype = new goosh.module.'+base+';'+ 30 | 'goosh.modobj.'+name+' = new goosh.module.'+name+';'+ 31 | 'goosh.modules.list["'+name+'"] = goosh.modobj.'+name+";"); 32 | } 33 | 34 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /goosh/searchers/.feed.js: -------------------------------------------------------------------------------- 1 | google.load("feeds", "1"); 2 | 3 | function search_feed(){ 4 | this.name = "feed"; 5 | this.aliases = new Array("feed","rss","f"); 6 | 7 | this.parameters = "<url>"; 8 | this.help = "read rss-feed"; 9 | this.helptext = "examples:
"+ 10 | "feed reddit.com - read reddit.com feed
"; 11 | 12 | this.lookupDone = function(result) { 13 | //output += "error"; 14 | if (result.error || result.url == null) { 15 | output.innerHTML += "Error: No Feed Found."; 16 | input.style['display'] = 'block'; 17 | focusinput(); 18 | 19 | return; 20 | } 21 | var url = result.url; //.replace('format=atom', 'format=rss_200'); 22 | // output.innerHTML += url; 23 | var feed = new google.feeds.Feed(url); 24 | feed.load(function(result) { 25 | if (!result.error) { 26 | //output.innerHTML += "Feed found." 27 | result.results = result.feed.entries; 28 | searchers_feed.render("feed", result, 202, "", ""); 29 | } 30 | else{ 31 | output.innerHTML += "Error: Feed not found." 32 | input.style['display'] = 'block'; 33 | focusinput(); 34 | 35 | 36 | 37 | } 38 | 39 | }); 40 | } 41 | 42 | 43 | this.call = function(args){ 44 | if(args.length > 0) 45 | input.style['display'] = 'none'; 46 | google.feeds.lookupFeed(args.join(" "), searchers_feed.lookupDone); 47 | } 48 | 49 | this.render = function(context, results, status, details, unused){ 50 | for(i=0;i
"; 22 | } 23 | } 24 | else{ 25 | output.innerHTML += "language is: "+langreverse[lang]+" ("+lang+")

"; 26 | } 27 | } 28 | 29 | 30 | } 31 | register_searcher("lang"); 32 | 33 | 34 | -------------------------------------------------------------------------------- /goosh/set/set.js: -------------------------------------------------------------------------------- 1 | goosh.lib.namespace("goosh.set"); 2 | 3 | goosh.set.base = function(name,def,txt,min,max){ 4 | this.name = name; 5 | this.txt = txt; 6 | this.def = def; 7 | (max) ? this.max = max : this.max = 2000; 8 | (min) ? this.min = min : this.min = 0; 9 | 10 | if(min && max) this.txt += " ("+min+".."+max+")"; 11 | 12 | this.get = function() { return eval (""+this.name+";"); }; 13 | this.set = function(val) { eval (""+this.name+" = '"+val+"';"); return true; }; 14 | 15 | } 16 | 17 | goosh.set.list = new Object(); 18 | goosh.set.list['lang'] = new goosh.set.base("goosh.config.lang","en","google default language"); 19 | goosh.set.list['lang'].set = function(val) { 20 | if (goosh.lang.reverse[val]) goosh.config.lang = val; 21 | else if (goosh.lang.list[val]) goosh.config.lang = goosh.lang.list[val]; 22 | else return false; 23 | return true; 24 | }; 25 | 26 | goosh.set.list['results'] = new goosh.set.base("goosh.config.numres","4","number of results for google-searches",1,100); 27 | goosh.set.list['timeout'] = new goosh.set.base("goosh.config.timeout","4","timeout for ajax requests in seconds",1,100); 28 | 29 | goosh.set.list['style.bg'] = new goosh.set.base("goosh.config.bgcolor","#FFFFFF","goosh background color"); 30 | goosh.set.list['style.bg'].set = function(val){ 31 | if( goosh.gui.setstyle("body","backgroundColor",val) && 32 | goosh.gui.setstyle("inputfield","backgroundColor",val)){ 33 | goosh.config.bgcolor = val; 34 | return true; 35 | } 36 | else return false; 37 | } 38 | 39 | goosh.set.list['style.fg'] = new goosh.set.base("goosh.config.fgcolor","#000000","goosh font color"); 40 | goosh.set.list['style.fg'].set = function(val){ 41 | if( goosh.gui.setstyle("body","color",val) && 42 | goosh.gui.setstyle("inputfield","color",val)){ 43 | goosh.config.fgcolor = val; 44 | return true; 45 | } 46 | else return false; 47 | } 48 | 49 | goosh.set.list['style.hl'] = new goosh.set.base("goosh.config.hlcolor","#009900","goosh highlight color"); 50 | goosh.set.list['style.hl'].set = function(val){ 51 | goosh.gui.setstyleclass(".info","color: "+val); 52 | goosh.gui.setstyleclass("a:visited.info","color: "+val); 53 | goosh.config.hlcolor = val; 54 | return true; 55 | } 56 | 57 | goosh.set.list['style.sh'] = new goosh.set.base("goosh.config.shcolor","#666666","goosh 'shaded' color"); 58 | goosh.set.list['style.sh'].set = function(val){ 59 | goosh.gui.setstyleclass(".less","color: "+val); 60 | goosh.config.shcolor = val; 61 | return true; 62 | } 63 | 64 | 65 | goosh.set.list['style.link'] = new goosh.set.base("goosh.config.linkcolor","#0000CC","goosh link color"); 66 | goosh.set.list['style.link'].set = function(val){ 67 | goosh.gui.setstyleclass("a","color: "+val); 68 | goosh.config.linkcolor = val; 69 | return true; 70 | } 71 | 72 | 73 | goosh.set.list['style.vlink'] = new goosh.set.base("goosh.config.vlinkcolor","#551a8b","goosh visited link color"); 74 | goosh.set.list['style.vlink'].set = function(val){ 75 | goosh.gui.setstyleclass("a:visited","color: "+val); 76 | goosh.config.vlinkcolor = val; 77 | return true; 78 | } 79 | 80 | goosh.set.list['theme'] = new goosh.set.base("goosh.config.theme","","ace theme"); 81 | goosh.set.list['theme'].set = function(val){ 82 | // goosh.gui.setstyleclass("a:visited","color: "+val); 83 | goosh.gui.css('/css/'+val+'.css'); 84 | goosh.config.theme = val; 85 | return true; 86 | } 87 | 88 | 89 | 90 | // #551a8b 91 | 92 | //goosh.gui.setstyleclass 93 | 94 | 95 | 96 | goosh.set.list['place.width'] = new goosh.set.base("goosh.config.mapwidth","300","width of map image",20,600); 97 | goosh.set.list['place.height'] = new goosh.set.base("goosh.config.mapheight","150","height of map image",20,500); 98 | 99 | goosh.set.list['amazon.reflink'] = new goosh.set.base("goosh.config.reflink","on","Add referer links to amazon product links"); 100 | 101 | goosh.set.init = function(context,result){ 102 | 103 | if(goosh.config.user != "guest") { 104 | if(!context) { 105 | goosh.ajax.query("http://goosh.appspot.com/cookie?callback=goosh.set.init"); 106 | return; 107 | } 108 | else if(goosh.ajax.iscontext(context)){ 109 | 110 | goosh.gui.outln("Loading remote settings..."); 111 | //alert(result); 112 | goosh.lib.cookie.getfromstr(document.cookie); 113 | goosh.lib.cookie.getfromstr(result,true); 114 | 115 | } 116 | 117 | } 118 | else { 119 | goosh.gui.outln("Loading local settings..."); 120 | goosh.lib.cookie.getfromstr(document.cookie); 121 | } 122 | 123 | var cookies = goosh.lib.cookie.getall(); 124 | 125 | for(key in goosh.set.list){ 126 | var c = false; 127 | if(cookies[key]) c = cookies[key]; 128 | if(c && goosh.set.list[key].set(c)) { 129 | goosh.gui.outln(" "+key+" => ""+c+""."); 130 | } 131 | else{ 132 | goosh.set.list[key].set(goosh.set.list[key].def); 133 | // goosh.gui.outln(key+" = ""+goosh.set.list[key].get()+""."); 134 | } 135 | } 136 | 137 | goosh.gui.outln(""); 138 | // goosh.gui.updateprompt(); 139 | // goosh.gui.showinput(); 140 | // goosh.gui.focusinput(); 141 | goosh.getquery(); 142 | 143 | } 144 | 145 | 146 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | goosh.org - the unofficial google shell. 9 | 10 | 11 | 14 | 15 | 27 | 28 | 29 | 30 | 31 | 32 |
33 | 34 | 35 | 36 | 45 | 46 |
37 | 38 |
39 | 40 |
41 | 42 |
43 |  
44 |
47 |
48 | 49 | 50 |
51 | 52 | 53 | 54 | Goosh goosh.org 0.6.0-beta #1 Google/Ajax
55 |
56 | Welcome to goosh.org - the unofficial google shell.
57 |
58 | This google-interface behaves similar to a unix-shell.
59 | You type commands and the results are shown on this page.
60 |
61 | goosh is powered by google custom search. 62 |
63 |
64 | goosh is written by Stefan Grothkopp 65 | 71 |
72 | it is NOT an official google product!
73 | goosh is open source under the Artistic License/GPL.
74 | 75 |
76 | Enter help or h for a list of commands. 77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 | 91 | 98 | 99 | 100 | --------------------------------------------------------------------------------