Skip to content

Commit

Permalink
Merge pull request #157 from gwydion67/master
Browse files Browse the repository at this point in the history
change from ghostscript to pdfium
  • Loading branch information
proffapt authored Feb 4, 2025
2 parents 40c985a + f19da47 commit b714409
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ beautifulsoup4==4.13.1
blinker==1.9.0
bs4==0.0.2
cachetools==5.5.1
camelot-py==1.0.0
certifi==2025.1.31
cffi==1.17.1
chardet==5.2.0
Expand All @@ -28,19 +29,19 @@ MarkupSafe==3.0.2
numpy==2.2.2
oauth2client==4.1.3
oauthlib==3.2.2
opencv-python==4.11.0.86
opencv-python-headless==4.11.0.86
openpyxl==3.1.5
packaging==24.2
pandas==2.2.3
pdfminer.six==20240706
pillow==11.1.0
proto-plus==1.26.0
protobuf==5.29.3
pyasn1==0.6.1
pyasn1_modules==0.4.1
pycparser==2.22
pyparsing==3.2.1
pypdf==5.2.0
pypdf_table_extraction==1.0.1
pypdfium2==4.30.1
python-dateutil==2.9.0.post0
pytz==2025.1
Expand All @@ -56,4 +57,3 @@ typing_extensions==4.12.2
tzdata==2025.1
uritemplate==4.1.1
urllib3==2.3.0
Werkzeug==3.1.3
11 changes: 0 additions & 11 deletions requirements.txt.bak

This file was deleted.

6 changes: 5 additions & 1 deletion utils/academic_calander_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,12 @@ def upzip_and_delete_zip(zip_file_name,result_folder_name):

def export_json():
filename = get_latest_calendar_name()
## [NOTE]
## ignore the read_pdf not found warning
tables = camelot.read_pdf(filename,pages="all")
## also the devs of camelot have mismached backend names so ghostscript points to pdfium and vice versa ...
## so basically this is using pdfium but backend name needs to be ghostscript
## in future if this gets fixed this need to be changed back
tables = camelot.read_pdf(filename,pages="all",backend="ghostscript")

print("Checking for pre-existing folder")
delete_file(JSON_FOLDER_NAME)
Expand Down

0 comments on commit b714409

Please sign in to comment.