From 8e71e49ea3708c30a4a0d3688cc9d643665d68be Mon Sep 17 00:00:00 2001 From: nitromaster101 Date: Tue, 30 Jun 2009 23:19:17 +0000 Subject: tyler's patch for fcl search git-svn-id: http://freebase-python.googlecode.com/svn/trunk@155 5914aa95-5b3a-0410-a3b5-7b719e7fe9b2 --- freebase/fcl/commands.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'freebase/fcl') 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 + -- cgit v1.3.1