Skip to content

Commit

Permalink
Made ToC title correct
Browse files Browse the repository at this point in the history
  • Loading branch information
nimaid committed Jul 5, 2020
1 parent 6b407e2 commit 0343d9a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,27 @@ The `.` is what seperates the ordering numbers from the bookmark name in the dir

The `sharpen=1` means not to sharpen during the purification step.

The bookmark structure can be previewed without actually processing any files:

```
$ bookdir2pdf.py --input_dir test_dir/ --table_of_contents
... [output removed] ...
Example PDF - Table of Contents
-------------------------------
Page #1 Cover Page
Page #2 --- Empty Directory Example #1
Page #2 --- --- Nested Empty Directory Level 1
Page #2 --- --- --- Nested Empty Directory Level 2
Page #2 --- --- --- --- Nested Empty Directory Level 3
Page #2 Empty Directory Example #2
Page #2 The First Part
Page #2 --- Chapter 1
Page #4 --- Chapter 2
Page #6 The Middle Part
Page #6 --- Chapter 3
Page #8 --- Chapter 4
Page #10 The Final Part
Page #10 --- Chapter 5
Page #12 --- Chapter 6
2 changes: 1 addition & 1 deletion bookdir2pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def dir_path(string):
# Add nested bookmarks from page_dict
print()
if args["table_of_contents"]:
toc_title = input_dir_name + " - Table of Contents"
toc_title = pdf_title + " - Table of Contents"
print(toc_title)
print(''.join(['-' for x in range(len(toc_title))]))
else:
Expand Down

0 comments on commit 0343d9a

Please sign in to comment.