pyinat / naturtag

Tag your nature photos with iNat taxonomy and observation metadata
https://naturtag.readthedocs.io
MIT License
37 stars 4 forks source link

can't write tags to files with ORF and other extensions #267

Open andrew-taylor opened 1 year ago

andrew-taylor commented 1 year ago

FYI files with ORF (and RAW and dmg I think) extensions aren't recognized as image files but, unless I missing something, otherwise the functionality is actually present to write tags from the CLI (maybe they can't be displayed by UI - I know there are a pile of RAW formats) My use case is modifying/creating xmp files rather than modifying the image file anyway but something to consider.

$  naturtag -t 10277  a.ORF
Not a valid path: /tmp/a.ORF
$ ln -s a.ORF a.jpg
$ naturtag -t 10277  a.jpg
$ exiftool a.ORF |grep taxon
Subject                         : "Perching Birds", "Pheucticus Grosbeaks", "Yellow Grosbeak", Animalia, Animals, Birds, Chordates, taxonomy:kingdom=Animalia, taxonomy:phylum=Chordata, taxonomy:subphylum=Vertebrata, taxonomy:class=Aves, taxonomy:order=Passeriformes, taxonomy:family=Cardinalidae, taxonomy:genus=Pheucticus, "taxonomy:species=Pheucticus chrysopeplus", inat:taxon_id=10277, dwc:taxonID=10277
Subject Reference               : "Perching Birds", "Pheucticus Grosbeaks", "Yellow Grosbeak", Animalia, Animals, Birds, Chordates, taxonomy:kingdom=Animalia, taxonomy:phylum=Chordata, taxonomy:subphylum=Vertebrata, taxonomy:class=Aves, taxonomy:order=Passeriformes, taxonomy:family=Cardinalidae, taxonomy:genus=Pheucticus, "taxonomy:species=Pheucticus chrysopeplus", inat:taxon_id=10277, dwc:taxonID=10277
XP Subject                      : "Perching Birds","Pheucticus Grosbeaks","Yellow Grosbeak",Animalia,Animals,Birds,Chordates,taxonomy:kingdom=Animalia,taxonomy:phylum=Chordata,taxonomy:subphylum=Vertebrata,taxonomy:class=Aves,taxonomy:order=Passeriformes,taxonomy:family=Cardinalidae,taxonomy:genus=Pheucticus,"taxonomy:species=Pheucticus chrysopeplus",inat:taxon_id=10277,dwc:taxonID=10277
JWCook commented 1 year ago

Sure, I can do that. I have a separate issue for adding raw file support to the UI, which will just take a little more work to display image previews: #232

The CLI will be easier. Instead of handling raw file extensions specifically (it's a fairly large pile!), I could:

JWCook commented 1 year ago

By the way, you're one of the first people besides myself to use this tool, so I appreciate the suggestions!