Skip to content

Commit

Permalink
Corrected misspelling.
Browse files Browse the repository at this point in the history
  • Loading branch information
bookfere committed Jun 8, 2022
1 parent 0556a1b commit 11e3035
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions FixCover.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def get_filename(self, path):
return path.split('/')[-1];


def get_demaged_thumbnails(self, path):
def get_damaged_thumbnails(self, path):
thumbnails = dict()
for thumbnail in self.get_filepath_list(path):
asin = re.match(rf'.*{re.escape(os.sep)}thumbnail_(.+)_EBOK.+', thumbnail)
Expand All @@ -68,7 +68,7 @@ def get_ebook_list(self, path):
return ebook_list


def fix_demaged_thumbnails(self, path, thumbnails):
def fix_damaged_thumbnails(self, path, thumbnails):
ebook_list = self.get_ebook_list(path)
failure_jobs = {
'cover_errors': [],
Expand Down Expand Up @@ -184,16 +184,16 @@ def handle(self, path = []):
self.print_log_text('Processing Kindle device: %s' % kindle_root)
documents_path, thumbnails_path = self.get_kindle_path(kindle_root)

self.print_log_text('Checking demaged ebook covers:', True)
thumbnails = self.get_demaged_thumbnails(thumbnails_path)
self.print_log_text('Checking damaged ebook covers:', True)
thumbnails = self.get_damaged_thumbnails(thumbnails_path)

if not any(thumbnails):
self.print_log_text('- No ebook covers need to fix.')
return

self.print_log_text('Fixing demaged ebook covers:', True)
self.print_log_text('Fixing damaged ebook covers:', True)
self.print_log_text('Working ...')
failure_jobs = self.fix_demaged_thumbnails(documents_path, thumbnails)
failure_jobs = self.fix_damaged_thumbnails(documents_path, thumbnails)

if any(len(job) > 0 for job in failure_jobs.values()):
if len(failure_jobs['cover_errors']) > 0:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Fix-Kindle-Ebook-Cover

This is a Python script to fix demaged ebook cover like below in kindle.
This is a Python script to fix damaged ebook cover like below in kindle.

![](screenshots/damaged-kindle-ebook-covers.png)

Expand Down Expand Up @@ -29,9 +29,9 @@ __CLI version:__
Run the script __fix_kindle_ebook_thumbnails.py__ on terminal with zero, one or more Kindle root directories.

```console
$ python3 fix_kindle_ebook_thumbnails.py
$ python3 fix_kindle_ebook_thumbnails.py /path/to/kindle
$ python3 fix_kindle_ebook_thumbnails.py /path/to/kindle1 /path/to/kindle2
$ python3 fix_kindle_ebook_cover.py
$ python3 fix_kindle_ebook_cover.py /path/to/kindle
$ python3 fix_kindle_ebook_cover.py /path/to/kindle1 /path/to/kindle2
```

![](screenshots/fix-kindle-ebook-cover-cli.png)
Expand Down
Binary file modified screenshots/fix-kindle-ebook-cover-cli.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/fix-kindle-ebook-cover-gui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 11e3035

Please sign in to comment.