add counts to reload
This commit is contained in:
parent
0c206d5f4d
commit
0a730ae7f7
25
src/main.py
25
src/main.py
@ -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()
|
Loading…
Reference in New Issue
Block a user