add reload functionality
This commit is contained in:
parent
30e88c6bdb
commit
0c206d5f4d
2
src/insert.py
Normal file
2
src/insert.py
Normal file
@ -0,0 +1,2 @@
|
||||
import lib
|
||||
|
@ -1,12 +1,13 @@
|
||||
import extract
|
||||
import search
|
||||
import insert
|
||||
|
||||
def prompt():
|
||||
return input("Search Value: ")
|
||||
|
||||
def menu():
|
||||
value = prompt()
|
||||
while value != "quit":
|
||||
while value != "quit" or value != "reload":
|
||||
results = search.query(value)
|
||||
if type(results) == dict:
|
||||
print(results["content"])
|
||||
@ -14,7 +15,9 @@ def menu():
|
||||
for doc in results:
|
||||
print(doc["index"], " : ", doc["title"])
|
||||
value = prompt()
|
||||
|
||||
if value == "reload":
|
||||
extract.parse()
|
||||
value = prompt()
|
||||
|
||||
def main():
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user