Skip to content

ion1/yql-shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

yql-shell: A quick and dirty “shell” for testing YQL expressions.

Read about YQL at http://developer.yahoo.com/yql/

USAGE:

Interactive:

% ./yql-shell
> select title, url from search.web(10) where query="foo"

You should see the top ten web search results for ‘foo’ in a pager.

> select content from html where url="http://www.imdb.com/title/tt0813715/episodes" and xpath="//table//h3/a"

You should see a dump of Heroes episode titles in a pager.

Exit with ^D.

Non-interactive:

% ./yql-shell 'select title, url from search.web(10) where query="foo"'

% echo 'select title, url from search.web(10) where query="foo"' >query
% ./yql-shell <query

To prevent yql-shell from launching a pager, redirect its output to a file or
another program:

% ./yql-shell '...' >output

% ./yql-shell '...' | tail

DEPENDENCIES:

Ruby 1.8 and the JSON library for Ruby
OR
Ruby 1.9

About

A quick and dirty “shell” for testing YQL expressions

Resources

License

Stars

Watchers

Forks

Packages

No packages published