-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
39 lines (22 loc) · 881 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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