View Single Post
Old 06-02-2015, 10:38 PM   #23
loviedovie
Addict
loviedovie ought to be getting tired of karma fortunes by now.loviedovie ought to be getting tired of karma fortunes by now.loviedovie ought to be getting tired of karma fortunes by now.loviedovie ought to be getting tired of karma fortunes by now.loviedovie ought to be getting tired of karma fortunes by now.loviedovie ought to be getting tired of karma fortunes by now.loviedovie ought to be getting tired of karma fortunes by now.loviedovie ought to be getting tired of karma fortunes by now.loviedovie ought to be getting tired of karma fortunes by now.loviedovie ought to be getting tired of karma fortunes by now.loviedovie ought to be getting tired of karma fortunes by now.
 
Posts: 295
Karma: 2139988
Join Date: Nov 2014
Device: bookeen
@BetterRed

Thanks for all your help, this works for me Great way to achieve what I needed. This should be a wiki entry

This is my script to convert to djvu. It can be run in a folder. It is linux only and you need pdf2djvu package

#!/bin/bash

fltyp()
{
IFS=$'\n'
filename_full="$1"

filename=$(basename "$filename_full" .pdf)

export DIR=$(readlink -f $filename_full)
DIR=${DIR%/*}
echo $DIR
pdf2djvu -j 4 --lossy -v "$2" -o $DIR/$filename.djvu

}


export -f fltyp

find -type f -name "*.pdf" -exec bash -c 'fltyp "{}" "{}"' \;
loviedovie is offline   Reply With Quote