From 36e65aacc2046d8ffccc96deaf68a9b090ab5431 Mon Sep 17 00:00:00 2001 From: Zihan <32484940+wzh4464@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:03:23 +0800 Subject: [PATCH] 1.0.3 --- .github/workflows/release-pdf.yml | 2 +- add_ctexart_comment.py | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release-pdf.yml b/.github/workflows/release-pdf.yml index 0aee899..5027f8d 100644 --- a/.github/workflows/release-pdf.yml +++ b/.github/workflows/release-pdf.yml @@ -44,7 +44,7 @@ jobs: mkdir -p pdfs find . -path "./Excalidraw" -prune -o -name "*.md" -print | while IFS= read -r file; do echo "Converting $file to PDF..." - pandoc "$file" --resource-path=$(dirname $file) -o "pdfs/$(basename "$file" .md).pdf" --pdf-engine=xelatex --template=$PWD/template/my_template.latex + pandoc "$file" --resource-path=$(dirname $file):$(dirname $file)/assets -o "pdfs/$(basename "$file" .md).pdf" --pdf-engine=xelatex --template=$PWD/template/my_template.latex done - name: Create Release diff --git a/add_ctexart_comment.py b/add_ctexart_comment.py index 83c8976..60c895f 100644 --- a/add_ctexart_comment.py +++ b/add_ctexart_comment.py @@ -6,7 +6,7 @@ # Created Date: Monday, June 17th 2024 # Author: Zihan # ----- - # Last Modified: Monday, 17th June 2024 7:53:50 pm + # Last Modified: Monday, 17th June 2024 7:59:27 pm # Modified By: the developer formerly known as Zihan at # ----- # HISTORY: @@ -43,14 +43,14 @@ # f.truncate() # substitute all space in file name with '_' -# for file in md_files: -# new_file = file.replace(' ', '_') -# print(f'Renaming {file} to {new_file}') -# os.rename(file, new_file) +for file in md_files: + new_file = file.replace(' ', '_') + print(f'Renaming {file} to {new_file}') + os.rename(file, new_file) # also for foler name -folders = glob.glob('**/', recursive=True) -for folder in folders: - new_folder = folder.replace(' ', '_') - print(f'Renaming {folder} to {new_folder}') - os.rename(folder, new_folder) +# folders = glob.glob('**/', recursive=True) +# for folder in folders: +# new_folder = folder.replace(' ', '_') +# print(f'Renaming {folder} to {new_folder}') +# os.rename(folder, new_folder)