darktable-org / darktable-org/darktable
RFC: Functional Tagging
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.1k
- Forks
- 1.4k
- Avg merge
- 22h 14m
- Merged PRs (30d)
- 198
Description
What is it?
Functional tagging is storing information in a tag to be used for functional reasons including:
- maintaining group persistence across database instances - #19637
- storing information for retrieval in variable substitution - #19771, #19637
Content Tagging vs Functional Tagging
Content tagging is what tagging is commonly understood as. Who, what, where, when, are all examples of content tagging.
Functional tagging is used as data storage to implement some type of functionality.
How do we keep them separate
darktable already implements functional tagging, but it's only used for a couple of things. darktable tags are implemented under a darktable| hierarchy. The most used functional tag is darktable|format|<file format>. Since darktable functional tags are in their own hierarchy I propose keeping that structure in order to minimize "interference" with content tagging.
What can we do with it?
- groups of groups - currently darktable only has one level of grouping based on group leader image id. If you load RAW+JPEG pairs then you can't group in a different manner without destroying the RAW+JPEG group. If we use group tagging, then there is no limit on the amount of groups you can have, and the group information will be recorded in the XMP files so that grouping can persist across database instances.
- metadata exposure - user's want access to image metadata beyond what is stored in the image table in the database. The information store in the image table is required by darktable to process the image. User's often want access to metadata that is informational in nature (such as Fuji film simulation) that isn't necessary to darktable or used by darktable to process the image. Additionally, depending on the method, metadata that isn't available using exiv2 can be accessed with another tool and stored.
- expose as variable - Sometime user's want access to some internal metadata such as the image id. A simple lua-script can go through the database and add a tag with the image id, allowing the image id to be exposed as a variable
- whatever you can dream up - if we think of tags as a way to store/pass information between functions then it provides another tool for serving problems.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
This RFC names no implementation files, tests, or entry points; start by reviewing darktable's existing functional-tag hierarchy and how tags are persisted in XMP. Before implementation, define the supported tagging model and its database and metadata behavior, with agreement on what constitutes done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- data, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100