feat: implement dynamic training course tab system and modular PDF data migration scripts
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import pdfplumber
|
||||
|
||||
files = [
|
||||
'/home/x79/sisvietnamvn_01/sisvietnamvn_Trang chính thức hiện tại/DaoTao/2.-CHUONG-TRINH-CAN-THIEP-MACH-MAU-THAN-KINH-NANG-CAO-BO-SUNG-FINAL.pdf',
|
||||
'/home/x79/sisvietnamvn_01/sisvietnamvn_Trang chính thức hiện tại/DaoTao/CHUONG-TRINH-CAN-THIEP-MACH-MAU-CAC-TANG-VA-MACH-MAU-NGOAI-BIEN-CO-BAN.pdf',
|
||||
'/home/x79/sisvietnamvn_01/sisvietnamvn_Trang chính thức hiện tại/DaoTao/CHUONG-TRINH-CHUAN-BI-DUNG-CU-VA-CHAM-SOC-BENH-NHAN-TRONG-PHONG-CHUP-MACH.pdf',
|
||||
'/home/x79/sisvietnamvn_01/sisvietnamvn_Trang chính thức hiện tại/DaoTao/CHUONG-TRINH-DAO-TAO-TIM-MACH-CAN-THIEP-1.pdf'
|
||||
]
|
||||
|
||||
for f in files:
|
||||
print(f'Checking {f}')
|
||||
with pdfplumber.open(f) as pdf:
|
||||
text = ''
|
||||
for page in pdf.pages:
|
||||
text += page.extract_text() or ''
|
||||
|
||||
print(" Length:", len(text))
|
||||
if 'Thời gian' in text or 'Đối tượng' in text or 'Học phí' in text:
|
||||
print(' -> Found some keywords.')
|
||||
else:
|
||||
print(' -> Keywords NOT found.')
|
||||
Reference in New Issue
Block a user