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,11 +2,23 @@ import extract
import search
import insert
def start():
extract.parse()
print("Existing:", extract.existing)
print("Inserted:", extract.inserted)
print("To big:", extract.big)
print("Dupes:", extract.duplicates)
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:
@ -15,19 +27,10 @@ def menu():
for doc in results:
print(doc["index"], " : ", doc["title"])
value = prompt()
if value == "reload":
extract.parse()
value = prompt()
def main():
extract.parse()
print("Existing:", extract.existing)
print("Inserted:", extract.inserted)
print("To big:", extract.big)
print("Dupes:", extract.duplicates)
menu()
start()
if __name__ == '__main__':
main()