Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
nimaid committed Jul 3, 2020
1 parent b327ba4 commit a454d23
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
3 changes: 2 additions & 1 deletion nested-pdf-merge.py → bookdir2pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions build_portable.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion environment-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: nested-pdf-merge_build
name: bookdir2pdf_build
channels:
- defaults
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: nested-pdf-merge
name: bookdir2pdf
channels:
- defaults
dependencies:
Expand Down

0 comments on commit a454d23

Please sign in to comment.