View Single Post
Old 05-03-2013, 01:56 PM   #2
fxp33
Addict
fxp33 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.fxp33 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.fxp33 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.fxp33 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.fxp33 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.fxp33 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.fxp33 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.fxp33 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.fxp33 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.fxp33 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.fxp33 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.
 
Posts: 261
Karma: 110864
Join Date: Mar 2013
Location: Bordeaux, France
Device: Kobo Glo, Aura HD, kindle paperwhite
Linux bash (raspberry Pi)

I'm not a specialist of bash. My experiment needs enhancement.

Code:
#!/bin/bash

# https://www.mobileread.com/forums/showpost.php?p=2098144&postcount=254
cd /media/xxx/Kobo/philo_pdf
for file in *.pdf; do
#title=`cat ../../title/$file`
#title=`$file`
echo ""
echo " Title is $file"
echo ""
oldfile=$file
newfile="$file.epub"
echo " Converting: $file " 
echo ""
echo "started: $(date)"
echo ""
echo $newfile
[ ! -f "$newfile" ] && /usr/bin/ebook-convert "$file" "$file.epub" --no-default-epub-cover --no-svg-cover  --insert-metadata --authors "pdfConvert" --title "$file" || echo "$newfile already exists"
done

François
fxp33 is offline   Reply With Quote