Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Possible Google Command Update
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Chris  
View profile  
(1 user)  More options Sep 2 2008, 10:40 pm
From: Chris <chris.pick...@gmail.com>
Date: Tue, 2 Sep 2008 19:40:40 -0700 (PDT)
Local: Tues, Sep 2 2008 10:40 pm
Subject: Possible Google Command Update
One of the suggested commands was a site search in google (ie
site:slashdot.org apple), it seemed to me a little strange to have two
commands for this, and not quite in line with the whole natural
language thing. So I made this update to the google command, so that
you can do something like:

google slashdot.org for apple and it will do a google search like:
site:slashdot.org apple

Any suggestions would be welcome... The only thing I can think of to
make it better would be to detect if the first argument is a domain
name, so that it would cut down on "errors", where a person actually
was using the word for in a google search.

CmdUtils.CreateCommand({
        name: "google",
        icon: "http://www.google.com/favicon.ico",
        searchURL: "http://www.google.com/search?hl=en&q=",
        description: "Searches Google for your words.",
        takes: {"site_or_keywords": noun_arb_text},
        modifiers: {"for": noun_arb_text},

        execute: function(site_or_keywords, modifiers)
        {
        var query = this.buildQuery(site_or_keywords,modifiers);
                Utils.openUrlInBrowser( this.searchURL + query );
        },

        preview: function(pblock, site_or_keywords, modifiers) {
                var query = this.buildQuery(site_or_keywords,modifiers);
                var pTemplate = "Searches Google for <b>${query}</b>";
                var pData = {query: query };
                pblock.innerHTML = CmdUtils.renderTemplate(pTemplate, pData);

                var url = "http://ajax.googleapis.com/ajax/services/search/web";
                var params = { v: "1.0", q: query };

                jQuery.get( url, params, function(data) {
                        var numToDisplay = 3;
                        var results = data.responseData.results.splice( 0, numToDisplay );

                        pblock.innerHTML = CmdUtils.renderTemplate( {file:"google-
search.html"},{results:results} ); }, "json");
        },

        buildQuery: function(site_or_keywords, modifiers)
        {
                if(modifiers.for.text) { return 'site:' + site_or_keywords.text + '
' + modifiers.for.text; }
        else { return site_or_keywords.text; }
        },


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
pvncad  
View profile  
(1 user)  More options Sep 3 2008, 1:14 am
From: pvncad <pvn...@gmail.com>
Date: Tue, 2 Sep 2008 22:14:06 -0700 (PDT)
Local: Wed, Sep 3 2008 1:14 am
Subject: Re: Possible Google Command Update
Instead of using "google slashdot.org for apple",  does "google apple
in slashdot.org" looks better ?
I feel this format will give more flexibility for search as I can
start with normal google search and if I am not satisfied with
search result in preview, then i can refine it to a particular site.

Does this looks fine to you ?

-pvncad

On Sep 3, 7:40 am, Chris <chris.pick...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Julien Couvreur  
View profile  
 More options Sep 3 2008, 1:43 am
From: Julien Couvreur <julien.couvr...@gmail.com>
Date: Tue, 2 Sep 2008 22:43:05 -0700 (PDT)
Local: Wed, Sep 3 2008 1:43 am
Subject: Re: Possible Google Command Update

In addition to pvncad's variant (good idea), would it be possible for
the command to make a suggestion based on the current page's domain?
This way if you are on slashdot and Ubiq "google apple", it would
offer "google apple (in <domain>)" and "google apple in slashdot.org".

Cheers,
Julien

On Sep 2, 10:14 pm, pvncad <pvn...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
msk...@gmail.com  
View profile  
 More options Sep 3 2008, 7:29 am
From: msk...@gmail.com
Date: Wed, 3 Sep 2008 12:29:47 +0100
Local: Wed, Sep 3 2008 7:29 am
Subject: Re: [ubiquity] Re: Possible Google Command Update

or how about

google apple here

where,

here is the present webite?

- Mayuresh

On Wed, Sep 3, 2008 at 6:43 AM, Julien Couvreur
<julien.couvr...@gmail.com>wrote:

--
Mayuresh

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Pickett  
View profile  
 More options Sep 3 2008, 8:34 am
From: "Chris Pickett" <chris.pick...@gmail.com>
Date: Wed, 3 Sep 2008 08:34:06 -0400
Local: Wed, Sep 3 2008 8:34 am
Subject: Re: [ubiquity] Re: Possible Google Command Update

Wow, great ideas guys, I'll get to work on it and see what I can do.

Thanks!


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Pickett  
View profile  
(1 user)  More options Sep 3 2008, 9:47 am
From: "Chris Pickett" <chris.pick...@gmail.com>
Date: Wed, 3 Sep 2008 09:47:40 -0400
Local: Wed, Sep 3 2008 9:47 am
Subject: Re: [ubiquity] Re: Possible Google Command Update

Now it takes "in", so you can do "google apple in slashdot.org". It also
takes "here", so you can also do "google apple in here" and it will pick up
the current domain.

I don't know how I would go about updating the suggestion list, nor make
"here" a "magic word". Any pointers?

CmdUtils.CreateCommand({
    name: "google",
    icon: "http://www.google.com/favicon.ico",
    searchURL: "http://www.google.com/search?hl=en&q=",
    description: "Searches Google for your words.",
    takes: {"keywords": noun_arb_text},
    modifiers: {"in": noun_arb_text },

    execute: function(keywords, modifiers)
    {
      var query = this.buildQuery(keywords,modifiers);
        Utils.openUrlInBrowser( this.searchURL + query );
     },

    preview: function(pblock, keywords, modifiers) {
        var query = this.buildQuery(keywords,modifiers);
        var pTemplate = "Searches Google for <b>${query}</b>";
        var pData = {query: query };
        pblock.innerHTML = CmdUtils.renderTemplate(pTemplate, pData);

        var url = "http://ajax.googleapis.com/ajax/services/search/web";
        var params = { v: "1.0", q: query };

        jQuery.get( url, params, function(data) {
            var numToDisplay = 3;
            var results = data.responseData.results.splice( 0, numToDisplay
);

            pblock.innerHTML = CmdUtils.renderTemplate(
{file:"google-search.html"},{results:results} ); }, "json");
    },

    buildQuery: function(keywords, modifiers)
    {
        var site = modifiers.in.text;

        if(modifiers.in.text)
        {
            if(modifiers.in.text == "here")
            {
                bw = CmdUtils.getWindowInsecure();
                var url = bw.location.href;
                var re = /(https?:\/\/\w+?\..+\.\w+\/).*/;
                url = url.replace(re,"$1");

                site = url;
            }

            return 'site:' + site + ' ' + keywords.text;
        }
      else { return keywords.text; }
    },


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Solomon  
View profile  
 More options Sep 3 2008, 10:36 am
From: David Solomon <dave.m.solo...@gmail.com>
Date: Wed, 3 Sep 2008 07:36:20 -0700 (PDT)
Local: Wed, Sep 3 2008 10:36 am
Subject: Re: Possible Google Command Update
i love it. how many times have i had to...
1. highlight the domain portion of the address i was on
2. open up a new tab
3. move my focus up to the google search bar
4. type in site:
5. paste in the domain i copied.

Yeah Mayuresh + Chris Pickett!

On Sep 3, 9:47 am, "Chris Pickett" <chris.pick...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Julien Couvreur  
View profile  
 More options Sep 3 2008, 12:21 pm
From: Julien Couvreur <julien.couvr...@gmail.com>
Date: Wed, 3 Sep 2008 09:21:10 -0700 (PDT)
Local: Wed, Sep 3 2008 12:21 pm
Subject: Re: Possible Google Command Update

Looks really good.
For the suggestion list, it may be possible to use the history/places
API to autocomplete domain names.
I'm just starting to learn it but this seems a good entry point:
http://developer.mozilla.org/en/Querying_Places

Cheers,
Julien

On Sep 3, 6:47 am, "Chris Pickett" <chris.pick...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google