Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ReadPdf.py #165

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions scripts/ReadPdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down