So I added in the second parameter. Thanks, I didn't realize it required two. According to this post
Quote:
Originally Posted by pdurrant
Download and install 32-bit (x86) ActivePython from here.
Download the kindlestrip 1.2.zip file. Unzip to give kindlestrip.py
Copy the book you want stripped to the same directory as kindlestrip.
Open a command window
use the cd command to switch to the same directory as kindlestrip
type python kindlestrip.py [BOOKNAME]
where [BOOKNAME] is the name of the ebook to be stripped.
|
it isn't required. I had scrolled through the kindlestrip thread for the first cli example.
Shouldn't this work just as well?
Code:
rm conversion.log
#fix for() loop not handling witespace
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
for file in $@; do
echo "*******************************" >> conversion.log
if $(kindlestrip "$file" "$file">> conversion.log); then
echo "$file was successfully stripped!" >> conversion.log
else
echo "$file was NOT stripped!" >> conversion.log
fi
done
#restore default IFS
IFS=$SAVEIFS
I am unsure why you need to backup to filename.new
EDIT: Just realized what you meant when you said whitespaced files won't work -- because of the for loop. Fixed.