This commit is contained in:
luzhisheng 2023-05-15 16:56:53 +08:00
parent a9ac2cf223
commit 9effaf05b1
4 changed files with 14 additions and 0 deletions

1
.gitignore vendored
View File

@ -6,6 +6,7 @@
*.zip
*.pyc
*.vscode
*.pdf
package.json
package-lock.json
venv/

View File

0
工具/合并pdf/main.py Normal file
View File

View File

@ -0,0 +1,13 @@
import os
from PyPDF2 import PdfMerger
target_path = 'docs'
pdf_lst = [f for f in os.listdir(target_path) if f.endswith('.pdf')]
print(pdf_lst)
pdf_lst = [os.path.join(target_path, filename) for filename in pdf_lst]
file_merger = PdfMerger()
for pdf in pdf_lst:
file_merger.append(pdf) # 合并pdf文件
file_merger.write("docs/终稿-艾映锋-电商数据采集与数据分析-论文.pdf")