mirror of
https://github.com/tiyn/amphora-wiki.git
synced 2026-02-22 04:44:48 +01:00
src: fixed quote-signs
This commit is contained in:
@@ -29,7 +29,7 @@ def createSearchableData(root):
|
||||
for r, d, f in os.walk(root):
|
||||
for file in f:
|
||||
path = os.path.join(r, file)
|
||||
fp = open(path,encoding='utf-8')
|
||||
fp = open(path,encoding="utf-8")
|
||||
title = fp.readline()
|
||||
text = title + fp.read()
|
||||
writer.add_document(title=title, path=path, content=text)
|
||||
@@ -55,7 +55,7 @@ def search_times(query_str, topN):
|
||||
matches = s.search(query, limit=topN)
|
||||
for match in matches:
|
||||
results.append(
|
||||
{'title': match['title'], 'path': match['path'], 'match': match.score})
|
||||
{"title": match["title"], "path": match["path"], "match": match.score})
|
||||
return results
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user