I would like to add tags when using Safari DT clip extension to speed up later organization of downloaded webpages.
Now the issue is that I usually keep my databases closed and have only my Inbox db open all the time; this way I loose the autocompletion of tags present in the closed db’s.
Here’s my feature request: is it possible for the Inbox to keep an “cache/index” of all the tags of my databases so that autocompletion is available for all of them? Every time you open a db, DT will sync the “index”.
In the meantime, in case someone else has the same issue, that’s the kludge I’m using:
- For each one of my databases I create a dummy file and I add to it all the tags present in that database.
That is done using the following script (I just made a few tests on it so use it carefully):
-- Based on DT script: Add tags to selection
-- Created by Christian Grunenberg on Mon Aug 29 2011.
-- Copyright (c) 2009-2011. All rights reserved.
-- Modified by: johseb
-- Rev0 2014-02-18
tell application id "com.devon-technologies.thinkpro2"
try
set theselection to the selection
if theselection is {} then error "Please select a file."
if (count of theselection) is not 1 then
display dialog "Select only 1 file, please." buttons {"Cancel"} default button 1 with icon 2
else
set TagList to ""
repeat with aTag in children of tags group of current database
set TagList to TagList & ";" & name of aTag
end repeat
set {od, AppleScript's text item delimiters} to {AppleScript's text item delimiters, ";"}
set theTags to text items of TagList
repeat with theRecord in theselection
set tags of theRecord to theTags
end repeat
set AppleScript's text item delimiters to od
end if
on error error_message number error_number
if the error_number is not -128 then display alert "DEVONthink Pro" message error_message as warning
end try
end tell
- I put a copy of all the dummy files inside my Inbox. So doing Inbox will inherit all the tags of all my databases and autocompletion works for all of them.
Of course every time you add a tag to a database you have to run again the script and copy the dummy file and that’s the reason I’m asking for an automated procedure managed by DT.
I also noticed that tags are duplicated when using the sorter “Take note” (which I don’t use that much) while there’s only one instance using the clip extension.
Thanks.