I thought DTPO was using openmeta - why don’t my tags show anywhere else?
The OpenMeta tags are written to the filesystem when the documents are exported to disk, and DEVONthink reads OpenMeta tags on import/index. Where are you wanting the tags to show?
I use Yep! and also Tags. I’d like tags set in DTPO to show in these programs as well. I often scan a file to .pdf, then tag it as it is stored on my disk. It shows up in DTPO as an indexed file with tags. I also will grab content via the web clipper, or, ‘print’ to DTPO. When setting tags within DTPO they do not show in these external programs. If I can alter my workflow to make this happen, I’d be happy to do so.
It will work, but you’ll need to change your workflow somewhat. Tags are written out to disk when the document is exported. Any changes to the tags after that will not be written out to disk unless the document is imported into the database, then exported back out again. I index all my documents so that I can also search on the tags with Punakea, and whenever I change tags on a document (seldom) I re-import and index them back out again.
This script (use at your own risk) will write OpenMeta tags to selected documents that are imported or created inside a DEVONthink database (i.e., are not indexed). The script requires that the openmeta CLI (command line interface) is installed in usr/local/bin in your computer’s root directory. The CLI is available from OpenMeta here. Note that the CLI code has not been updated for 3.5 years and thus is very likely to break in a future release of OS X. (I’ve tested this up to 10.8.2 and it works for now.)
-- EXPERIMENTAL!!
-- Use at your own risk: loss of data is your risk
-- This script writes the tags of a non-indexed document to the original document on disk (in the database package)
-- Tags are written as OPENMETA tags
-- Derived from the following:
-- Script from Ironic Software_DL-20101020
-- http://ironicsoftware.com/community/comments.php?DiscussionID=942 [as of 20130208 this link is dead]
-- requires that the OPENMETA CLI (command line) be installed in /usr/local/bin
-- OPENMETA CLI available at
-- http://code.google.com/p/openmeta/downloads/detail?name=openmeta_commandline_1.3.0.zip
tell application id "com.devon-technologies.thinkpro2"
set theDatabase to current database
set theSelection to selection
if theSelection is {} then
error "Select something first"
end if
try
repeat with thisItem in theSelection
if the indexed of thisItem is false then
set theTags to tags of thisItem
set thePath to path of thisItem
set theParentPath to my getParentPath(thePath)
repeat with thisTag in theTags
try
set mycommand to "cd " & quoted form of theParentPath & "; clear; /usr/local/bin/openmeta -a " & quoted form of thisTag & " -p " & quoted form of thePath & ";/usr/local/bin/openmeta -p " & quoted form of thePath
do shell script mycommand
on error
display dialog "There was an error running the command " & mycommand & "" buttons {"OK"}
end try
end repeat
end if
end repeat
end try
end tell
on getParentPath(theString)
set oldDelimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to {"/"}
set pathItems to text items of (theString as text)
set ParentPath to ((reverse of the rest of reverse of pathItems) as string) & "/"
set theString to ParentPath
set AppleScript's text item delimiters to oldDelimiters
return theString
end getParentPath
Thank you both for the input and workaround options.