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 extract
|
||||||
import search
|
import search
|
||||||
|
import insert
|
||||||
|
|
||||||
def prompt():
|
def prompt():
|
||||||
return input("Search Value: ")
|
return input("Search Value: ")
|
||||||
|
|
||||||
def menu():
|
def menu():
|
||||||
value = prompt()
|
value = prompt()
|
||||||
while value != "quit":
|
while value != "quit" or value != "reload":
|
||||||
results = search.query(value)
|
results = search.query(value)
|
||||||
if type(results) == dict:
|
if type(results) == dict:
|
||||||
print(results["content"])
|
print(results["content"])
|
||||||
@ -14,7 +15,9 @@ def menu():
|
|||||||
for doc in results:
|
for doc in results:
|
||||||
print(doc["index"], " : ", doc["title"])
|
print(doc["index"], " : ", doc["title"])
|
||||||
value = prompt()
|
value = prompt()
|
||||||
|
if value == "reload":
|
||||||
|
extract.parse()
|
||||||
|
value = prompt()
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user