diff --git a/README.md b/README.md index ab757ce..cb4a869 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# nested-pdf-merge +# bookdir2pdf Merges a directory structure of images into a PDF with nested bookmarks. The PDF here was made using: -`./nested-pdf-merge.py -i test_dir/ -s "."` +`./bookdir2pdf.py -i test_dir/ -s "."` The `"."` is what seperates the ordering numbers from the bookmark name in the directory name. diff --git a/nested-pdf-merge.py b/bookdir2pdf.py similarity index 98% rename from nested-pdf-merge.py rename to bookdir2pdf.py index 280e549..5027a4c 100644 --- a/nested-pdf-merge.py +++ b/bookdir2pdf.py @@ -111,6 +111,7 @@ def dir_path(string): print("Creating nested bookmarks...") ident = "" ident_str = "--- " +pagenum_sep = "\t\tPage #" last_page_index = 0 path_list = list() bookmark_list = list() @@ -125,7 +126,7 @@ def iterdict(d, base_path=""): bm_name = k else: bm_name = args["order_number_seperator"].join(k.split(args["order_number_seperator"])[1:]).strip(" ") - print(ident + bm_name + "\tPage #" + str(last_page_index + 1)) + print(ident + bm_name + pagenum_sep + str(last_page_index + 1)) ident += ident_str path_list.append(k) diff --git a/build_portable.bat b/build_portable.bat index 1d316ff..cfca33a 100644 --- a/build_portable.bat +++ b/build_portable.bat @@ -23,11 +23,11 @@ del /f /s /q "%RELEASEDIR%" 1>nul 2>&1 rmdir /s /q "%RELEASEDIR%" 1>nul 2>&1 echo Building portable EXE... -call conda run -n nested-pdf-merge_build pyinstaller ^ +call conda run -n bookdir2pdf_build pyinstaller ^ --noconfirm ^ --onefile ^ --icon=icon.ico ^ - nested-pdf-merge.py + bookdir2pdf.py if errorlevel 1 goto ERROR del /f /s /q "%BUILDDIR%" 1>nul 2>&1 diff --git a/environment-build.yml b/environment-build.yml index b77d2c0..88ff8ad 100644 --- a/environment-build.yml +++ b/environment-build.yml @@ -1,4 +1,4 @@ -name: nested-pdf-merge_build +name: bookdir2pdf_build channels: - defaults dependencies: diff --git a/environment.yml b/environment.yml index 20de8c7..e07d06c 100644 --- a/environment.yml +++ b/environment.yml @@ -1,4 +1,4 @@ -name: nested-pdf-merge +name: bookdir2pdf channels: - defaults dependencies: