Skip to content

Commit

Permalink
Finished .rename functionality!
Browse files Browse the repository at this point in the history
  • Loading branch information
nimaid committed Jul 6, 2020
1 parent ad33867 commit 6e24b18
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion bookdir2pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,11 @@ def dir_path(string):
rename_dir = x_path

#TODO: Parse .rename files
rename_name = "PLACEHOLDER RENAME - TODO: READ FROM .rename FILE"
#rename_name = "PLACEHOLDER RENAME - TODO: READ FROM .rename FILE"
with open(x) as f:
rename_file_contents = f.read()

rename_name = rename_file_contents.strip().split("\n")[0].strip()

page_dir_rename_dict[rename_dir] = rename_name

Expand Down
Binary file modified test_dir.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion test_dir/01. Empty Directory Example #2/.rename
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Empty Directory Test W/ .rename File
Empty Directory .rename File Example

0 comments on commit 6e24b18

Please sign in to comment.