New command ">"

0 views
Skip to first unread message

elzr

unread,
Jan 21, 2006, 6:24:09 PM1/21/06
to YubNub
I read in a recent post about "amr" (Amazon through Google's Feeling
Lucky) and thought it was a great idea. Exploring Yubnub I found a
couple of other similar examples --"gww" (Wikipedia through GFL),
"lfl", and "amluck" (interestingly, it does basically the same as
"amr")-- and thought that this could be an interesting pattern to
exploit: using Google's Feeling Lucky as a fast, efficient and direct
gateway.

Being in love with Yubnub, I thought about this in command terms and
after some thinking came up with ">". I chose a symbol because I think
it could become a fairly common command and because the syntax it
allows is quite nice -- it makes me think of directness (->) and
compression (><), which I think is appropriate. Here's how it works:
(from it's man page)

--------------

URL: gfl site:{ extractDomainName { url {% 1 %s} } } {% 2- %s} [no url
encoding]

SYNOPSIS
> [Yubnub command] [query]

EXAMPLES
> wp Figures of speech
results: the article in the English Wikipedia about Figures of
speech

> wpde Jonathan Ive
results: the article in the German (de!) Wikipedia about
Jonathan Ive

> am The Future and its Enemies
results: the page in Amazon for Viginia Postrel's book The
Future and its Enemies

> imdb Amelie
results: the page in the IMDB for Le Fabuleux destin d'Amélie
Poulain

> cia India
results: the CIA Factbook entry for India. (And this is is a
much convenient than just using "cia", since then you have to know the
country two letter code.)

> cnn NYC transit workers
results: the CNN article "New Yorkers walk as transit strike
ruled illegal." This brings up a subtle point: this is not be the most
recent article in the topic, but rather the most important article on
CNN about NYC transit workers according to Google. So ">" can be
interpreted to mean: Quick! Take me to the most important page in this
site related to this query.

> lj annzah
results: the LiveJournal user page of the user Annzah.

> kottke just enough
results: Kottke's post "Just enough is more"

> / Shockwave Rider
results: an article in Slashdot about Schockwave Rider

DESCRIPTION
In practice, what ">" does is search a "content" website through
Google for your query and send you straight to the first result. It is
convenient because it builds on your knowledge of Yubnub commands and
because it is often more direct.

Here's a more precise description: Yubnub generates a URL by
interpreting the 1st param as a Yubnub command, it then extracts a
domain name from that URL and uses it to configure a Google Feeling
Lucky search for the 2nd param.

--------------

The command is far from perfect but I hope it's useful. The one think
that's killing me is that it's slow! The domain extraction mini-script
(man extractDomainName) is hosted on my server and that brings the
total speed down. A command is as fast as it's slowest sub-command.
This is a pity, Google is pretty much as fast as you can be in the web.
But more importantly, being fast is the raison d'etre of this command.
Suggestions please!

Oh, and this is the first Yubnub command after "man" that eats (has as
a parameter) other Yubnub commands, right?

Cheers to Yubnub!

-Eliazar
elzr.com

fuska

unread,
Jan 21, 2006, 7:27:16 PM1/21/06
to YubNub
COOL!!! elzr, I love this command
It's like a universal "I'm feeling lucky" button.

I think it deserves a Golden Egg right now

Did I say that I love it?

Brian

unread,
Jan 21, 2006, 10:28:50 PM1/21/06
to YubNub
I agree. This is a pretty cool command.

shantanuo

unread,
Jan 21, 2006, 11:17:53 PM1/21/06
to YubNub
added the command
>&
that will list the images from the given URL. for e.g.
>& yshop ipod

Jonathan Aquino

unread,
Jan 22, 2006, 12:13:10 AM1/22/06
to Yub...@googlegroups.com, shantanuo
Shantanu - The implementation of that command is a thing of beauty:

gim site:{ extractDomainName { url {% 1 %s} } } {% 2- %s} [no url encoding]

Bravo! This is definitely a golden egg.

--
Jon Aquino (Victoria BC Canada)
http://jonathanaquino.com

Jonathan Aquino

unread,
Jan 22, 2006, 12:17:48 AM1/22/06
to Yub...@googlegroups.com
I concur - this is awesome. Golden egg for sure.

--
Jon Aquino (Victoria BC Canada)
http://jonathanaquino.com


-----Original Message-----
From: Yub...@googlegroups.com [mailto:Yub...@googlegroups.com] On Behalf Of
fuska
Sent: Saturday, January 21, 2006 4:27 PM
To: YubNub
Subject: Re: New command ">"

elzr

unread,
Jan 22, 2006, 9:43:03 AM1/22/06
to YubNub
Thanks! Happy that you all liked it.

> It's like a universal "I'm feeling lucky" button.

Fuska, I couldn't have said it better. Your comment made me envision an
interesting use of this command: Say that you're in A List Apart
reading The Bathing Ape Has No Clotes and so you have this URL in your
location bar: http://www.alistapart.com/articles/bathingape. Well, you
suddenly remember that you heard somewhere that the old Zeldman just
produced a swell new article. As a natural-born-Yubnubber your first
impulse is to Ctrl-L to the location bar, and modify the url to: >
http://www.alistapart.com/articles/bathingape Zeldman, and be promptly
taken to Zeldman's spiffy Web 3.0 article! The command is quite more
universal than I thought, it can apply to any website URL not just to
Yubnub commands. Interesting!

Oh, and I'm very impressed by shantanuo's remix command ">&"! (though
slightly befuddled by the syntax :)

magicjj

unread,
Jan 22, 2006, 11:46:00 AM1/22/06
to YubNub
Incredible idea!! This is definately a thing of beauty. I just have one
question... Why didn't I think of that? =P

Ah and before making "amr" I didn't see the "amluck" command, but they
are different. "amr" includes the following: "Customer Reviews"
site:amazon.com query. The only difference is the "Customer Reviews"
part. I added this in here because I am using it to find the customer
reviews on Amazon, and this tells that that has to be in the result.

Reply all
Reply to author
Forward
0 new messages