I'm faced with the scary reality that Apple's Aperture has a great number of issues in macOS Sierra.
This leaves me looking for an alternative but from what I can tell so far, there's no photo library or editing app that deals with RAW+JPEG pairs quite like Aperture. I was wondering if there's a way to use Hazel during the initial culling of photos.
Background
My camera, like most, allows the simultaneous capture of a RAW and a JPEG file. The JPEGs my camera produces are usually all I need. In cases I want to tweak the picture, I turn to the RAW file, editing it in Iridient Developer.
The files have the same name and metadata but different file extensions (.jpeg, .raf). Aperture handles these files as one item during import into the library and allows the user to select which file to use for the preview. I always choose JPEG because the import process is quicker, the file previews are smaller, and going through the imported pictures is less resource-intensive.
This is especially useful when culling photos after importing. Deleting the item removes both the JPEG and the RAW file.
This type of RAW+JPEG handling doesn't exist in any other macOS software to my knowledge. Either the files are treated separately or the JPEG is ignored completely (I'm looking at you, Lightroom

I'm wondering if there's a way to emulate this behaviour with Hazel on a file system level.
Desired solution
1. Import files from camera into a predefined culling folder.
2. Sort by file type and use Quick Look on the JPEG files to quickly go through the photos, deleting the bad ones.
3. Once a JPEG file has been deleted, Hazel scans the folder for a matching RAW file and if found, deletes it, too.
Any idea how I can create a rule for this with Hazel? I have a feeling I'll need a script for this but I have very little experience in this area.
Cheers,
Alex