Tagging indexed files within DT and synching the tags on the

I am indexing one directory on my local file system.

Within DEVONthink, I am adding tags to the indexed files.

I want to see the tags added in the xattr of the files on the file system so other tools (like Leap from Ironic Software) can see the tags.

The only way I found to do that is to export the indexed files. Is there a way to add tags added within DT during a sync?

Thanks.

My experience has been that DT will write the tag almost immediately to the indexed file, unless perhaps, you’re dragging files into a user tag folder, in which case, I don’t think it will export the tag at all.

I believe that tag removal (again, via the tag bar or Applescript) will remove the tag from the indexed file, although I’m less sure of this. Someone else will have a definitive answer.

So unless you’re dragging to user tag folders, what might be wrong with your setup/process?

HTH, Charles

@cturner your input was definitively helpful. By “a user tag folder” you mean a group that has not been excluded from tagging? That is what I understood. All my tagged files were, in fact, in groups. I gave a random tag (a non-group tag) and it indeed was practically instantly written as an OpenMeta tag (it appeared in Leap as an OpenMeta tag)!

Weird behavior:

  • Let’s say I have a tagging group named ‘GroupA’. Let’s say I have a non-group-tag named ‘TagB’. Also, let’s say I import a directory for indexation with a couple of files in it.
  • If I replicate the files into group GroupA, they will be tagged GroupA inside DT, but the tag will not appear in Leap (more formally, the tag is not written in the xattr of the files).
  • Now, if I add the tag TagB to the files no only will TagB be written to the xattr of the files, but also the GroupA tag!
  • Finally, if I go back in DT and remove TagB from all the files but leave the files in GroupA (so they keep that tag), the xattr will still contain the tag GroupA (and GroupA will appear in Leap).

So, the current solution is to put a random tag, make sure the xattr have been written and then remove the random tag.

I would love to have access to the code repository of DT to fix those pesky bugs right now. :wink:

Thanks cturner!

Pascal

No bug. See viewtopic.php?f=4&t=10308#p48329

Is that a “yet to be documented feature.”? In the Appendix::Tagging section of the documentation, it is said that groups and tags are internally the same thing.

Also, at the bottom of that same page, it says the tags are only written back as OpenMeta tags when exported (it’s not true).

Finally, I find it perplexing that group tags ARE written as xattrs if a “real” tag is assigned to a file. When the “real” tag is de-assigned, the group tag is still in the xattr.

The way I now see it is that “real” tags ARE written as OpenMeta tag without the need to even synchronize.

That would mean there would be a difference between “real” tags and “group” tags (which is not what the documentation says IMO) and that contrary to what the documentation says, tags ARE written as OpenMeta tags ASAP (no need for a manual sync). Finally, the writing of group tags conditionally to the writing of a “real” tag is semantically bizarre (again, IMO).

Thanks for your input.

The only difference is that some operations update the OpenMeta stuff immediately (e.g. AppleScript, the Info panel and the Tags bar) and all others do not.

BTW, OT, but… what is the “Tags Bar”? The column that appears on the right when in the Tags view?

Thanks!

It’s the bar at the bottom of the window, e.g. after using View > Show Tags.

hey Pascal, I can´t answer the open questions. and you seem so proficient that my minor point/practical trick might be superfluous to mention, as you are certainly aware of this…

but as I encounter the same problem, I turned to the habit (call it a DTpro-»hack« if you like) of adding some “programmatic”-(non-group)-tag to the files; like »!dt-tagexport«. then it works with the syncing back of the tags to the original file, in a the way you (and Christian) already got to.

while this doesn´t resolve the background issue and the little uncontrollable/obstrusive break in behavior when it comes to »dedicated«-tags and »group«-tags, it might even have the advantage, of giving you the choice for which files the group-tags should be synced back to xattr…

… there is always something good in the bad… :slight_smile: