linux placeholder
This commit is contained in:
parent
82d7f85bdb
commit
054edd8a41
1 changed files with 12 additions and 0 deletions
|
@ -32,6 +32,18 @@ def find_fulltext_windows(query):
|
|||
books = [b.split(':')[0] for b in books]
|
||||
return get_ids(books, prefix)
|
||||
|
||||
def find_fulltext_linux(query):
|
||||
prefix = get_prefix()
|
||||
cmd = [
|
||||
'tracker',
|
||||
'sparql',
|
||||
'-q',
|
||||
"SELECT nie:url(?f) WHERE { ?f fts:match '%s' FILTER (tracker:uri-is-descendant ('file://%s', nie:url (?u))) }" % (query, prefix)
|
||||
]
|
||||
books = subprocess.check_output(cmd).decode().strip().split('\n')
|
||||
books = [b.split(':')[0] for b in books]
|
||||
return get_ids(books, prefix)
|
||||
|
||||
def find_fulltext(query):
|
||||
ids = []
|
||||
if sys.platform == 'darwin':
|
||||
|
|
Loading…
Reference in a new issue