Skip to content

Commit

Permalink
Updates - new futures testing
Browse files Browse the repository at this point in the history
  • Loading branch information
felipealfonsog committed Oct 25, 2023
1 parent c3dd762 commit bfe8bf4
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/termpdf_unstable.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ def main(stdscr):
print("2. View scanned PDF files")
print("3. Quit")

choice = input("Enter the number of your choice: ")
if choice == '1':
choice = stdscr.getch()

if choice == ord('1'):
pdf_files = scan_pdf_files()
if not pdf_files:
print("No PDF files found in the current directory.")
Expand All @@ -151,7 +151,7 @@ def main(stdscr):
for i, pdf_file in enumerate(pdf_files, start=1):
print(f"{i}. {pdf_file}")

elif choice == '2':
elif choice == ord('2'):
pdf_files = scan_pdf_files()
if not pdf_files:
print("No PDF files found in the current directory.")
Expand All @@ -172,7 +172,7 @@ def main(stdscr):
except ValueError:
print("Invalid input. Please enter a valid number.")

elif choice == '3':
elif choice == ord('3'):
print("Goodbye!")
break

Expand All @@ -182,4 +182,3 @@ def main(stdscr):
if __name__ == '__main__':
curses.wrapper(main)


0 comments on commit bfe8bf4

Please sign in to comment.