Darktable should already basically do all of this with their existing copy and import function. The only thing it won't do is erase the SD card for you, and generally I would recommend you just format it on the camera.