You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sys.stdout.write(' 1) Orientation Check \n 2) Rename file \n 3) Save OCR \n 4) Edit text \n 5) Exit \n (Can you multiple inputs)'+prompt)
47
+
choice=input()
48
+
while (i!=len(choice)):
49
+
print ('\n\t\t\t Current Choice: '+choice[i] +'\n')
50
+
ifchoice[i] =='1':
51
+
ocr_orientation_main(path)
52
+
print(" Orientation Check DONE!! \n")
53
+
elifchoice[i] =='2':
54
+
ocr_rename_main(path)
55
+
print("Rename to identified text DONE!! \n")
56
+
elifchoice[i] =='3':
57
+
ocr_save_main(path)
58
+
print("Save the OCR to /OCR-text/ DONE!! \n")
59
+
elifchoice[i] =='4':
60
+
image_make_main(path)
61
+
print("Edit the text in image DONE!! \n")
62
+
elifchoice[i] =='5':
63
+
print("\t\t\t Thank you for using Memento!")
64
+
sys.exit(1)
65
+
elifchoice[i] ==' ':
66
+
print("Chosing Next! \n")
67
+
else:
68
+
sys.stdout.write("Invalid Choice \n")
69
+
i+=1
70
+
71
+
if__name__=='__main__': #Execute all code before reading source file, ie. execute import, evaluate def to equal name to main
72
+
iflen(sys.argv) !=2: # Count number of arguments which contains the command-line arguments passed to the script if it is not equal to 2 ie for (py main.py 1_arg 2_arg)
73
+
raiseArgumentMissingException
74
+
path=sys.argv[1] #python main.py "path_to/img_dir" ie the argv[1] value
75
+
path=os.path.abspath(path) #Accesing filesystem for Return a normalized absolutized version of the pathname path
0 commit comments