feat: implement dynamic training course tab system and modular PDF data migration scripts
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import pdfplumber
|
||||
import sys
|
||||
|
||||
filename = "/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"
|
||||
with pdfplumber.open(filename) as pdf:
|
||||
text = ""
|
||||
for i, page in enumerate(pdf.pages):
|
||||
text += f"--- PAGE {i+1} ---\n"
|
||||
text += page.extract_text() + "\n"
|
||||
|
||||
with open('pdf1_output.txt', 'w', encoding='utf-8') as f:
|
||||
f.write(text)
|
||||
print("Saved to pdf1_output.txt")
|
||||
Reference in New Issue
Block a user