add counts to reload

This commit is contained in:
Daniel 2024-10-01 02:52:27 -05:00
parent 0c206d5f4d
commit 0a730ae7f7

View File

@ -2,25 +2,7 @@ import extract
import search
import insert
def prompt():
return input("Search Value: ")
def menu():
value = prompt()
while value != "quit" or value != "reload":
results = search.query(value)
if type(results) == dict:
print(results["content"])
else:
for doc in results:
print(doc["index"], " : ", doc["title"])
value = prompt()
if value == "reload":
extract.parse()
value = prompt()
def main():
def start():
extract.parse()
print("Existing:", extract.existing)
print("Inserted:", extract.inserted)
@ -29,5 +11,26 @@ def main():
menu()
def prompt():
return input("Search Value: ")
def menu():
value = prompt()
if value == "reload":
extract.parse()
value = prompt()
while value != "quit" or value != "reload":
results = search.query(value)
if type(results) == dict:
print(results["content"])
else:
for doc in results:
print(doc["index"], " : ", doc["title"])
value = prompt()
def main():
start()
if __name__ == '__main__':
main()