From 45b36e04bd80ecfe1ceed2cbf65f66d2890e5b00 Mon Sep 17 00:00:00 2001 From: abdel_kareem <72500236+abdelkareemkobo@users.noreply.github.com> Date: Wed, 27 Sep 2023 13:50:52 +0300 Subject: [PATCH] Update ReadPdf.py Remove duplicated function --- scripts/ReadPdf.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/scripts/ReadPdf.py b/scripts/ReadPdf.py index a06337f5..678eada9 100644 --- a/scripts/ReadPdf.py +++ b/scripts/ReadPdf.py @@ -3,22 +3,6 @@ from pypdf import PdfReader -def get_pdf_files(file_path): - """ - Get all PDF files from the specified file path. - - Args: - file_path (str): The directory path containing the PDF files. - - Returns: - list: A list containing the paths of all the PDF files in the directory. - """ - if os.path.exists(file_path): - return glob.glob(os.path.join(file_path, '*.pdf')) - else: - return [] - - def read_multiple_pdf(file_path: str) -> list: """ Read multiple PDF files from the specified file path and extract the text from each page.