8000 Fix chapter numbering in file paths · rkpayah/python-basics-exercises@6ba648c · GitHub
[go: up one dir, main page]

Skip to content

Commit 6ba648c

Browse files
committed
Fix chapter numbering in file paths
1 parent d95925a commit 6ba648c

7 files changed

+10
-10
lines changed

ch14-interact-with-pdf-files/1-extract-text-from-a-pdf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
# We'll assume you downloaded the solutions folder and extracted it into
1919
# the home directory on your computer. If this is not the case, you'll
2020
# need to update the path below.
21-
pdf_path = Path.home() / "python-basics-exercises/ch13-interact-with-pdf-files" \
22-
"/practice_files/zen.pdf"
21+
pdf_path = Path.home() / "python-basics-exercises/" \
22+
"ch14-interact-with-pdf-files/practice_files/zen.pdf"
2323

2424
# Now you can create the PdfFileReader instance. Remember that
2525
# PdfFileReader objects can only be instantiated with path strings, not

ch14-interact-with-pdf-files/2-extract-pages-from-a-pdf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
# downloaded the solutions folder and extracted it into the home
1717
# directory on your computer. If this is not the case, you'll need to
1818
# update the path below.
19-
pdf_path = Path.home() / "python-basics-exercises/ch13-interact-with-pdf-files" \
20-
"/practice_files/Pride_and_Prejudice.pdf"
19+
pdf_path = Path.home() / "python-basics-exercises/" \
20+
"ch14-interact-with-pdf-files/practice_files/Pride_and_Prejudice.pdf"
2121

2222
# Now you can create the PdfFileReader instance. Remember that
2323
# PdfFileReader objects can only be instantiated with path strings, not

ch14-interact-with-pdf-files/3-challenge-PdfFileSplitter-class.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ def write(self, filename):
4242
# Split the Pride_and_Prejudice.pdf file into two PDFs, the first
4343
# containing the first 150 pages, and the second containing the
4444
# remaining pages.
45-
pdf_splitter = PdfFileSplitter("ch13-interact-with-pdf-files/practice_files/Pride_and_Prejudice.pdf")
45+
pdf_splitter = PdfFileSplitter("ch14-interact-with-pdf-files/practice_files/Pride_and_Prejudice.pdf")
4646
pdf_splitter.split(breakpoint=150)
4747
pdf_splitter.write("pride_split")

ch14-interact-with-pdf-files/4-concatenating-and-merging-pdfs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717

1818
BASE_PATH = Path.home() / "python-basics-exercises/" \
19-
"ch13-interact-with-pdf-files/practice_files"
19+
"ch14-interact-with-pdf-files/practice_files"
2020

2121
pdf_paths = [BASE_PATH / "merge1.pdf", BASE_PATH / "merge2.pdf"]
2222
pdf_merger = PdfFileMerger()

ch14-interact-with-pdf-files/5-rotating-and-cropping-pdf-pages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717

1818
pdf_path = Path.home() / "python-basics-exercises/" \
19-
"ch13-interact-with-pdf-files/practice_files/split_and_rotate.pdf"
19+
"ch14-interact-with-pdf-files/practice_files/split_and_rotate.pdf"
2020

2121
pdf_reader = PdfFileReader(str(pdf_path))
2222
pdf_writer = PdfFileWriter()

ch14-interact-with-pdf-files/6-encrypting-and-decrypting-pdfs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717

1818
pdf_path = Path.home() / "python-basics-exercises/" \
19-
"ch13-interact-with-pdf-files/practice_files/top_secret.pdf"
19+
"ch14-interact-with-pdf-files/practice_files/top_secret.pdf"
2020

2121
pdf_reader = PdfFileReader(str(pdf_path))
2222
pdf_writer = PdfFileWriter()

ch14-interact-with-pdf-files/7-challenge-unscramble-a-pdf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ def get_page_text(page):
1010
return page.extractText()
1111

1212

13-
pdf_path = Path.home() / "github/realpython/python-basics-exercises/" \
14-
"ch13-interact-with-pdf-files/practice_files/scrambled.pdf"
13+
pdf_path = Path.home() / "python-basics-exercises/" \
14+
"ch14-interact-with-pdf-files/practice_files/scrambled.pdf"
1515

1616
pdf_reader = PdfFileReader(str(pdf_path))
1717
pdf_writer = PdfFileWriter()

0 commit comments

Comments
 (0)
0