diff options
Diffstat (limited to 'freebase/fcl')
| -rwxr-xr-x | freebase/fcl/commands.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/freebase/fcl/commands.py b/freebase/fcl/commands.py index 0fdc283..4b517ec 100755 --- a/freebase/fcl/commands.py +++ b/freebase/fcl/commands.py @@ -686,3 +686,14 @@ def cmd_log(fb, id): print simplejson.dumps(link, indent=2) + +def cmd_search(fb, what): + """Search freebase for "query" and print out 10 matching ids + + %prog search "some query" + """ + + r = fb.mss.search(what, format="ids", limit=10) + for id in r: + print id + |
