Author: dmeyer
Date: Wed Aug 15 11:16:39 2007
New Revision: 2776
Log:
Small search example searching in a T9 based way as
used for current mobile phones.
Added:
trunk/beacon/test/regexp.py
Added: trunk/beacon/test/regexp.py
==============================================================================
--- (empty file)
+++ trunk/beacon/test/regexp.py Wed Aug 15 11:16:39 2007
@@ -0,0 +1,16 @@
+import kaa
+import kaa.beacon
+
+kaa.beacon.connect()
+
+phone_keymap = ( '', 'abc', 'def', 'ghi', 'jkl', 'mno', 'pqrs', 'tuv', 'wxyz' )
+
+# search for stuff starting with 'the' (843)
+keys = '843'
+regexp = ''
+for k in keys:
+ regexp += '[' + phone_keymap[int(k)-1] + phone_keymap[int(k)-1].upper() +
']'
+regexp = kaa.beacon.QExpr('regexp', u'^%s.*' % regexp)
+
+for m in kaa.beacon.query(type='audio', title=regexp).get():
+ print m
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog