Skip to content

Commit b714409

Browse files
authored
Merge pull request #157 from gwydion67/master
change from ghostscript to pdfium
2 parents 40c985a + f19da47 commit b714409

File tree

3 files changed

+8
-15
lines changed

3 files changed

+8
-15
lines changed

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ beautifulsoup4==4.13.1
22
blinker==1.9.0
33
bs4==0.0.2
44
cachetools==5.5.1
5+
camelot-py==1.0.0
56
certifi==2025.1.31
67
cffi==1.17.1
78
chardet==5.2.0
@@ -28,19 +29,19 @@ MarkupSafe==3.0.2
2829
numpy==2.2.2
2930
oauth2client==4.1.3
3031
oauthlib==3.2.2
31-
opencv-python==4.11.0.86
32+
opencv-python-headless==4.11.0.86
3233
openpyxl==3.1.5
3334
packaging==24.2
3435
pandas==2.2.3
3536
pdfminer.six==20240706
37+
pillow==11.1.0
3638
proto-plus==1.26.0
3739
protobuf==5.29.3
3840
pyasn1==0.6.1
3941
pyasn1_modules==0.4.1
4042
pycparser==2.22
4143
pyparsing==3.2.1
4244
pypdf==5.2.0
43-
pypdf_table_extraction==1.0.1
4445
pypdfium2==4.30.1
4546
python-dateutil==2.9.0.post0
4647
pytz==2025.1
@@ -56,4 +57,3 @@ typing_extensions==4.12.2
5657
tzdata==2025.1
5758
uritemplate==4.1.1
5859
urllib3==2.3.0
59-
Werkzeug==3.1.3

requirements.txt.bak

Lines changed: 0 additions & 11 deletions
This file was deleted.

utils/academic_calander_handler.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,12 @@ def upzip_and_delete_zip(zip_file_name,result_folder_name):
8989

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

9599
print("Checking for pre-existing folder")
96100
delete_file(JSON_FOLDER_NAME)

0 commit comments

Comments
 (0)