Now we leave the store/ directory to take a quick tour of another one, strictly related: the relations/ directory. This one is used (guess what?) to manage relations between tags. Relations keep clean and effective your knowledge about tags and reduce the number of times you have to tag files, like a virtual tagging mechanism. Let's see how.
Tagsistant is a semantic filesystem. The adjective semantic refers to the meaning of tags which inherently establishes relations between them. For example, a relation of inclusion inherently exists between the concept of music and the concepts of rock and jazz. Another example is represented by the tags we created previously: scifi and startrek. Those tags obviously are related because Star Trek is a sci-fi TV show.
Tagsistant provides a way to describe such relations in a way that can be computationally used. In Tagsistant any relation always involves two tags and can be of two types:
- left-tag is equivalent to right-tag (use 'is_equivalent')
- left-tag includes right-tag (use 'includes')
For example, you can tell Tagsistant that scifi/ includes startrek/ by using mkdir under relations/:
$ mkdir ~/myfiles/relations/scifi/includes/startrek/
That's it. Now all the files tagged as startrek are inherently tagged as scifi too. The concept of inherently tagged means that a file tagged as startrek will act as if it was tagged as scifi too, even if the files is not, and it will act like this as long as the relation between the tags scifi and startrek is established.
The left tag (scifi in our example) must already exist, but Tagsistant can create the right tag for you, like in:
$ mkdir ~/myfiles/relations/scifi/includes/starwars/
The starwars tag did not exist yet, but if you list tags/, you'll find the starwars tag too:
$ ls ~/myfiles/tags/
scifi startrek starwars video
You noticed it? This is a small violation of what we have said before: tags can be created inside store/ and tags/ only. The auto-creation of the right tag under relations/ is just an aid to speed up your experience. For clearness, keep assumed that you can create tags inside store/ or tags/ only.
Let's wrap up what we have seen so far. We have created some tags (video, scifi, startrek and lastly starwars) and we have established two relations: scifi includes startrek and scifi includes starwars. Now we are ready to tag our files.