调整PDF生成目录,放到temp下面
This commit is contained in:
@@ -128,7 +128,10 @@ def fetch_and_create_pdf(url):
|
||||
today_posts = today_posts[::-1] # 倒序处理
|
||||
|
||||
# 设置PDF
|
||||
pdf_filename = f"JAV-{today}-{len(today_posts)}.pdf"
|
||||
# 修改PDF文件路径到项目根目录的temp目录下
|
||||
pdf_filename = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))),
|
||||
'temp',
|
||||
f"JAV-{today}-{len(today_posts)}.pdf")
|
||||
doc = SimpleDocTemplate(pdf_filename, pagesize=A3)
|
||||
|
||||
# 计算内容区域的宽度和高度
|
||||
|
||||
Reference in New Issue
Block a user