View Single Post
Old 03-12-2023, 02:17 PM   #1
Albretch Mueller
Junior Member
Albretch Mueller began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2023
Device: none
ebook-convert: You must specify the input AND output files ...

I am trying to use ebook-convert to convert compatible files to pdf and I need to log any warnings or messages that ebook-convert would generate while it does its work with each file.
I use essentially the same one liner to convert all webp files to png and I am doing a dry run first to make sure find is feeding the file paths properly. I would like to debug what ebook-convert is or isn't doing and compare it to the output of dwebp to understand why one works just fine but the other doesn't.

# search directory and extensions of files to be fished by find
_SDIR="<...>"
_X=".\(mobi$\|djvu$\|epub$\|azw3$\)"

###
# dry run
shopt -s nocasematch; shopt -s nocaseglob; time find "${_SDIR}" -type f -iregex .*"${_X}"

# conversion attempts
shopt -s nocasematch; shopt -s nocaseglob; time find "${_SDIR}" -type f -iregex .*"${_X}" -exec bash -c '_F="$1"; _PRFX="${_F%.*}"; ebook-convert "${_F}" -o "${_PRFX}".pdf' - {} \;
Albretch Mueller is offline   Reply With Quote