How to convert djvu files into pdf files?

Hello, i want to convert multiple *.djvu files to *.pdf with Hazel.
I would like to use the following programs:
djvu2pdf under Homebrew and Hazel
I have found the following shell script on the net:
with the shell script only one djvu file is converted. But there are several djvu files in the directory.
Where can the error be?
How does the shell script have to be adapted so that I can use it with Hasel?
The Hazel rule could look like this:
Thanks for your help.
Niels
I would like to use the following programs:
djvu2pdf under Homebrew and Hazel
I have found the following shell script on the net:
- Code: Select all
i="$1"
o="`basename $i .djvu`"
o="$o".pdf
cmd="ddjvu -format=pdf -quality=85 -verbose $i $o"
$cmd
with the shell script only one djvu file is converted. But there are several djvu files in the directory.
Where can the error be?
How does the shell script have to be adapted so that I can use it with Hasel?
The Hazel rule could look like this:
If all of the following conditions are met:
Extension is djvu
Kind is not Folder
Do the following to the matched file or folder:
Run shell script embedded script
Display notification with pattern: A djvu file was converted into the pdf file format!
Thanks for your help.
Niels