Skip to content

Commit

Permalink
工作流:修改纸张尺寸到A2,加入目录
Browse files Browse the repository at this point in the history
  • Loading branch information
ACaiCat authored May 3, 2024
1 parent b2c89cb commit dd5585c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DocHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@


def md_to_pdf(file_name):
os.system(f"pandoc --pdf-engine=xelatex -V mainfont=LXGWWenKaiMono-Regular.ttf -V geometry:margin=0.5in -V geometry:b5paper --template eisvogel.tex {file_name} -o {file_name.replace('.md', '.pdf')}")
os.system(f"pandoc --pdf-engine=xelatex -V mainfont=LXGWWenKaiMono-Regular.ttf -V geometry:margin=0.5in -V geometry:a2paper --template eisvogel.tex {file_name} -o {file_name.replace('.md', '.pdf')}")

if __name__ == '__main__':
print(f"🚀 开始执行打包脚本...(By Cai 😋)")
# 获取文件夹中所有的md文件,并按文件名排序
file_list = sorted([f for f in os.listdir("Document") if f.endswith('.md')])

# 创建或打开README.md文件
with open('README.md', 'w') as outfile:
with open('README.md', 'rw') as outfile:
for fname in file_list:
with open(os.path.join("Document", fname)) as infile:
# 将每个文件的内容写入README.md
Expand Down

0 comments on commit dd5585c

Please sign in to comment.