Skip to content

Instantly share code, notes, and snippets.

View grauschnabel's full-sized avatar

Martin Kaffanke grauschnabel

View GitHub Profile
@grauschnabel
grauschnabel / remove_exp
Created September 17, 2024 09:58
Removeing my darktable xmp files after removing images with another tool.
#!/usr/bin/env python
import os
def delete_unmatched_xmp_files(directory):
"""
Recursively delete .xmp files in a directory if the corresponding base file (e.g., .jpg, .png, .nef) does not exist.
:param directory: The directory to search for .xmp files.
"""