Tagging is a day by day process. Today you tag some movie with a tag, tomorrow I'll want to add another one. How can be done this in Tagsistant?
There are two ways to add more tags to an object. The first one is to copy the same object in the new tag:
$ cp somefile.txt ~/myfiles/store/tag1/@ [ ... some days later ... ] $ cp somefile.txt ~/myfiles/store/tag2/@
Tagsistant is smart enough to understand that you've copied the same file twice (see Deduplication later) so it keeps just one copy of the file with both tags tag1/ and tag2/.
This is however suboptimal, because you're forced to wait for the copy process to complete twice, very annoying especially for big files like movies. Moreover, deduplicating the files takes time too, because it has to scan the whole file to compute it checksum. A better way would be the mv command:
$ cp somefile.txt ~/myfiles/store/tag1/@ [ ... some days later ... ] $ mv ~/myfiles/store/tag1/@/somfile.txt ~/myfiles/store/tag1/tag2/@
The mv command gets internally translated into a rename() call which Tagsistant manages very efficiently. rename() basically removes from somefile.txt all the tags listed in the source query (the left one) and then adds all the tags contained in the destination query (the right one). So what's basically happening is:
- the tag tag1/ from the source query is removed
- the tag tag1/ from the destination query is added
- the tag tag2/ from the destination query is added
Point 1 and 2 produce a neutral effect, so the only result of this command is to add query tag2/ to somefile.txt. Just remember to add to the destination query the same tags you include in the source query, otherwise some tagging will be lost. To avoid unintentionally removing some tags, use the ALL/ special tag in the source query:
$ mv ~/myfiles/store/ALL/@/somefile.txt ~/myfiles/store/tag2/@
See later for more information on the ALL/ special tag.