after years of working just with text files (Markdown) and the Finder and a short test of Evernote, I am back to DevonThink.
Now, I imported the Evernote notebooks and want to autoclassify them. In order to be able to restore the order from Evernote, I have the groups (notebooks and notes combined with documents) tagged automatically (group tags) in this âImport from Evernoteâ database.
Problem is, as soon as groups are dissolved by autoclassification, the group tag will be gone as well.
How can I assign all group tags (mostly 2: from an integrated note and the notebook on top) to the documents as normal tags in order to be able to restore the earlier relations?
I am at war with AppleScript, unfortunately. â I am doing well with the Terminal, but AppleScript logic never got into my head
I have tried converting some of the AppleScripts (particularly âConvert Comments to Tagsâ to create a tag from the folder name.
I can get a name from the groups in the top level (showing them in a dialog for checking whether it works), but I do not get into the groups , and I cannot put the variable into a for the documents.
tell application id "DNtp"
try
set these_groups to the selection
if these_groups is {} then error "Please select some groups."
repeat with this_group in these_groups
set this_tag to the name of this_group
if this_tag is not "" then
display dialog this_tag --fine
set tags to text items of this_group --ERROR message:
(*DEVONthink Proâ hat einen Fehler erhalten: tag of parent id 13762 of database id 2 kann nicht in Typ reference umgewandelt werden.*)
end if
end repeat
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 also have problems getting into the subfolders that were created when a note contained some files.
I tried updating my knowledge about AppleScript yesterday, but it is not my world of logic; I did not get it in earlier years, and I wonât get it now.
PS After checking what âYou had meâ meant and the meaning of âMr. Greenâ, I feel a bit relaxed. Huuuh, and a bit oldâŚ
Just to add, I noticed when changing the names manually that DT will not let a group tag and a normal tag have the same name. In my manual workflow, I copy the name of the group tag, then rename the group tag to a new name, then apply the old name as normal tags to the files.
Iâm not sure what youâre describing here. You can have a Tag and a group with the same name. Please post a screencapture of what youâre referring to.
I think these three screenshots can explain what I mean. In these examples, the database properties has the option âExclude Groups from Taggingâ unchecked .
In the following screenshot, the ABC group tag is presented in a grey highlight:
When I add normal tags, they appear in blue:
But I canât add a normal tag with the same name as the group tag. Nothing happens when the script âAdd tags to selectionâ is executed: