This commit is contained in:
jyamihud 2022-04-01 22:29:15 +03:00
parent 443e25054c
commit b8a2de97ee
4 changed files with 6 additions and 6 deletions

View file

@ -46,7 +46,7 @@ def search_app(name):
match = m match = m
if closest: if closest:
return closest return closest, match
# Round 2. By Generic name # Round 2. By Generic name
@ -58,7 +58,7 @@ def search_app(name):
match = m match = m
if closest: if closest:
return closest return closest, match
def suggest(json_data): def suggest(json_data):

View file

@ -76,10 +76,10 @@ class handler(BaseHTTPRequestHandler):
software = self.path.replace("/", "").replace("+", " ") software = self.path.replace("/", "").replace("+", " ")
software_data = search.search_app(software) software_data, match = search.search_app(software)
page = ""
page = render.search_widget(page)
page = render.search_widget("")
page = page +"Match: "+ str(match*100)+"%"
# Let's add the found software to the page # Let's add the found software to the page
page = render.html(page, software_data) page = render.html(page, software_data)
page = render.suggestions(page, software_data) page = render.suggestions(page, software_data)