Skip to content

Commit 5e73036

Browse files
committed
clean up and move some to main.py
1 parent a1b1acc commit 5e73036

File tree

6 files changed

+332
-599
lines changed

6 files changed

+332
-599
lines changed

database/main.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
"""Main loop for CLI menu like interfaces."""
22
import sys
3+
import os
34
import tombll_view
5+
import make_tombll_database
6+
7+
os.chdir(os.path.dirname(os.path.abspath(__file__)))
48

59

610
def show_menu():
@@ -13,7 +17,6 @@ def show_menu():
1317
print("5. update - Insert missing TRLE book records with info and walkthrough")
1418
print("6. trle - Run http TRLE")
1519
print("7. trle_local - Run TRLE local")
16-
print("8. trle_local_pic - Run TRLE local picture cards")
1720
print("0. Exit")
1821

1922

@@ -24,7 +27,7 @@ def main_menu():
2427
choice = input("Enter your choice: ").strip()
2528

2629
if choice == "1":
27-
pass
30+
make_tombll_database.run()
2831
elif choice == "2":
2932
pass
3033
elif choice == "3":
@@ -34,12 +37,10 @@ def main_menu():
3437
elif choice == "5":
3538
pass
3639
elif choice == "6":
37-
pass
40+
tombll_view.scrape_trle_index()
3841
elif choice == "7":
3942
tombll_view.local_trle_index()
40-
elif choice == "8":
41-
tombll_view.local_trle_pictures_index()
42-
elif choice == "0":
43+
elif choice in ("0", "q"):
4344
print("Exiting...")
4445
sys.exit(0)
4546
else:

0 commit comments

Comments
 (0)