diff --git a/pyglossary/plugins/ebook_mobi.py b/pyglossary/plugins/ebook_mobi.py index ee369a076..2f788af9b 100644 --- a/pyglossary/plugins/ebook_mobi.py +++ b/pyglossary/plugins/ebook_mobi.py @@ -311,7 +311,7 @@ def add_group(state): add_group(state) def write(self): - import subprocess + import subprocess, shutil filename = self._filename kindlegen_path = self._kindlegen_path @@ -322,6 +322,8 @@ def write(self): # https://www.amazon.com/gp/feature.html?ie=UTF8&docId=1000765211 # run kindlegen + if not kindlegen_path: + kindlegen_path = shutil.which("kindlegen") if not kindlegen_path: log.warning(f"Not running kindlegen, the raw files are located in {filename}") log.warning(