darktable-cli questions

If you’re trying to export multiple files in a folder, I usually use a loop in bash instead, more flexible.

For example, this would list all RAF files, then call darktable-cli on each, output to “exported” folder and append .jpg to the filename. You can try running this, it just prints out the darktable-cli command for you to tweak, once you think it’s good, just remove the echo and it will actually call darktable-cli.

The ${f%.*} basically extracts the filename without extension (from the RAF file).

ls *.RAF | while read f; do echo darktable-cli "$f" "exported/${f%.*}.jpg"; done

In my folder, the above command will print this (if you remove echo, it will execute these instead)

darktable-cli DSCF5438.RAF exported/DSCF5438.jpg
darktable-cli DSCF5439.RAF exported/DSCF5439.jpg
darktable-cli DSCF5440.RAF exported/DSCF5440.jpg
darktable-cli DSCF5441.RAF exported/DSCF5441.jpg

BTW, I don’t think --core quality 90 works, you need to specify the plugin with --core --conf plugins/imageio/format/jpg/quality=90 (I think I found out while trying to set TIFF format to 32-bit for my script with --core --conf plugins/imageio/format/tiff/bpp=32)

1 Like