I’m probably asking anything new but I think that nowadays it is strongly important to put tags on files. Everybody owns gigas and gigas of mp3s (exif files in general), flac, images in jpg and raw files, pdfs and so on.
Many of us use Darktable or Digikam for images and raws and other softwares for just pdfs and others just for audio files. Many software just for one reason: tagging.
I think that manage and modify this tags in nautilus/file explorer it is now very important. Why not, I would say that modify straight the xmp files of Darktable (just for instance) would be incredibly useful as well.
Gnome could play an important role in some intercommunication between tagging and various archiviation software but I understand that this might be difficult to achieve, maybe in a next future.
Can it be seriously considered to be added in nautilus in some way?
The challenge with tagging is that there isn’t one single tagging mechanism for every type of content nor every file system.
The most natural fit for us would be tags in tracker database, but that wouldn’t be easily exportable nor interoperable with how other apps (e.g. Darktable) handle metadata. Other people would prefer xattrs, but same limitation arises.
XMP metadata can in some cases be embedded in the content file itself, or it may be saved in a “sidecar” file. And then many file types have their own unique metadata formats. All of this seems to be format and application-specific.
Trying to tackle all of this in one-metadata-tag-editor-to-rule-them-all sounds like mission impossible to me.
I think the only way to consider some metadata editing in nautilus would be to pick well defined scopes and focus on that. Limiting the scope to specific content types allows specialization of the interface (e.g. showing only the metadata that’s relevant for the use case).
In nautilus we already show read-only metadata tags for some specific types of files (photos, audio, video). We used to have for PDF too via evince, but that’s not ported to GTK4 yet sadly. And we have support for 3rd party extensions to add metadata for other file types.
Right now, this is read-only. But in theory we could allow some basic editing of the metadata shown in properties. Provided that the library used to read the metadata also provides a way to change it easily.
Here is the metadata shown for a photo on my system, as an example:
Would it make sense to edit any of these metadata fields? If so, when, how and why?
If you have interesting examples from other metadata we already display in nautilus, which you would like to edit, feel free to share!
So, if we start from the metadata that’s already shown in nautilus Properties for the supported file formats, can you share examples of metadata that you would like to edit? How and why?
MP3: talking about mp3 (and webm too), it looks like Rhythmbox does a good job as audio tag editor. I may be wrong but I believe that you can also apply the modifications on multiple files at once as well. This modifications I think can be seen on Windows systems as well. In light of that I don’t see any reason to not give the same capabilities with a right click to Nautilus as well.
RAW files and jpgs: I tried exiftool and apparently, in my tests, it is perfectly able to add keywords to Sony .arw raw files. The added keywords are perfectly readable by darktable as well even if you disable the .xmp sidecar files.
PDF: exiftool adds keywords to pdf files and these keywords are easily read in Evince.
MP4: unfortunately I haven’t tried it yet but it looks that “ffmpeg” can read and modify metadata in video files.
As you say, it may not be necessary to modify every meta information, but I think it is important today to add keywords to files, index them to find them in Terabytes of data.
My view is that we have already all the instruments needed, they just need to be integrated somewhere!
Indexing is already done. You can use tracker info to check indexed metadata which has been extracted from an indexed file. And it’s possible to make advanced queries for files matching certain metadata, as explained in Tracker3 search Command-line expression syntax
Which tags/keywords do you have in mind? These words are often used with different meaning depending on the context. Sometimes “tags” are any metadata fields (e.g. audio tag editors, to change Artist nam, Album name, etc). In other cases, “tags” are a non-hierarchical mechanism to organize files by category (e.g. GitHub - kra-mo/hyperplane: A non-hierarchical file manager)
Tags as keywords to organize and search files are usually what is requested. I find it an interesting experiment but I don’t think mixing hierarchical and non-hierarchical is a good idea. However, the file chooser should probably support organization by tag.
There is "user.xdg.tags" xattr attribute that can be used to store tags. I could think of making it part of Nautilus Annotations – at least to be able to store and read tags – but extensions have no power over Nautilus search mechanism, so eventually that part would need to be integrated into Nautilus.
Generally, any feature has at least one user interface. In this case, this would mean that Files would also include an interface for tagging files. And it may take time depending on the design team’s interest, unless they accept search by tag without having a UI to tag files…
An alternative, depending on António’s will, would be to implement tags and their search as a hidden feature (no user interface for tagging and for searching by tags) and to allow search results to be returned to the extension. Then it would be up to you to develop the interface to display the results.