Added information : I felt quite stupid when I noticed, after doing this script that there was one available in darktable already, made with lua. What I noticed though, was that this script does not keep EXIF information? This is the reason why I still use the python script.