Are they all untagged in darktable? Are they from the same day or time? You can sort and filter for them in darktable.
You can also close darktable, use the list to modify the XMP file, then start darktable again and it should import the XMP file, if you have that config option checked.
These are “random” images. My wife, aka The Boss, has picked them. They span 10 years of photos. I will be making a blurb book as a present for her best friend.
That would work for me, if I could create an exiftool tag called: the-boss and write it in the xmp, then dt could be refreshed/re-read xmps, then I could do my processing.
Tags aren’t saved in the xmp file, they are saved in the database.
Not sure if you use Ratings with your images, if you don’t you can use that. Near the top of the xml file there’s an entry that looks like this:
xmp:Rating="0"
Change that to, say, 5 stars:
xmp:Rating="5"
Now you can limit what’s shown to 5 stars and you are good to go with the selective tagging.
You still need to stop darktable firtst before doing this and have the correct config option checked to let darktable pick up on the xml changes afterwards.
Just in case and assuming your list consists of name.raw_extension (foo.nef or /full/path/to/bar.CR2), this one-liner might come in handy:
while read THIS; do sed -i 's/xmp:Rating="0"/xmp:Rating="5"/' "${THIS}.xmp"; done <image.list.txt
cant’ get the above to show as one line, but it is supposed to be…
Do make sure you test this first, though!
EDIT:
As mentioned by elstoc and pehar below it turns out that tags ARE saved in the xmp!
Not sure what would be easier for you to do, though: Creating a script that adds a correct block of xml to each xmp or approach this via the above workaround. The latter would change just one field and the bulk tagging is done from within darktable.
Tags are saved to the xmp file (or they should be). The xmp should allow all changes to the file to be reconstructed, and so should contain the same information (about the image and its edits) as is stored in library.db.
I added a tag “atest” to an image and saw the following in my xmp:
And more importantly for what @foto wants, tags are read from XMP files.
The trick with an external script is figuring out which XMP fields to populate. Perhaps he can compare with what digikam writes to its sidecars (which are read by dt).
I really though that they are part of the data.db (tags table) and library.db (tagged_images table). Once I noticed that (way back) I never bothered to look in the xmps. My bad!
Well, at least I offered a one-liner that can be used