I've had to clean up huge swathes of files by importing them in various DevonThink Pro Office databases and groups. Because I didn't want to import first in the Inbox and then refile, I've made a macro to import directly into a given group.
Because I have too many groups to remember, I've added a "spotlight" style search that allows me to whittle down the groups as I type.
Importing to the global inbox:
type the keybinding ⌃⌥⌘I
your file disappears into DevonThink's Global Inbox
NOTE: you need to put the UUID of your own Global Inbox in the macro, of course (thx @rolian !)
Importing to a specific database:
a window appears with a list of your open databases. Start typing in the text field to narrow it down, select with arrow keys / return or the mouse.
This is terrific. Thanks for sharing. Only thing I'd add is that you should insert a comment into the Global Inbox macro telling people to change the UUID to the one specific to their Global Inbox. Otherwise, while it still puts the file there, it doesn't delete it from the Finder.
This macro is now definitely more than moderately useful. If you take the json output from the Groups macro and run it through a json->csv converter e.g. http://convertcsv.com/json-to-csv.htm ), you get a nicely formatted Excel spreadsheet) with the UUID of every group in your databases. This is enormously helpful for Applescripting and Hazel rules on a Mac and for creating scripts in the Shortcuts app on iOS- there's no need to go into DEVONthink and get the UUIDs one by one. What a timesaver!! Thanks again. for this great macro set.
In the "Import to DT Groups" macro, after the second action (or first action after the initial comment) if you want to be precise), which runs the AppleScript and saves the json info to the variable "jsonListGroups", just insert another action to display that variable in a window. (Or, just duplicate the Execute AppleScript action, but change the dupe to "display results in a window" instead of "save results to variable").
Copy the text from the window and run it through a json-->csv converter.
Either way, you'll get the UUIDs nicely formatted for all the top level groups in your open databases,
I have the KMFAM and Spotlight Search Prompt installed and installed the Apps DevonThink Import... macros. The interface works, somewhat. The search results seem imprecise: only top level groups seem to populate the list as I type. As far as I can tell, lower level groups are not found.
Yes, as noted in post 12 above "Either way, you'll get the UUIDs nicely formatted for all the top level groups in your open databases".
I too would love to get the lower level groups, but don't know enough AppleScript to rewrite the macro
Although you describe your macro as "crude", I think it is quite sophisticated. BUT, it seems to generate only the top-level groups in a database. In looking at the AppleScript, I'm not sure why that is the case, nor can I tell how to change it so that, for example, if I have a group called "Hardware" in my Computer database, and "AppleWatch" and "iMac" as groups/folders contained in the Hardware group, I would like "AppleWatch" and "iMac" to show up when searching. Any ideas on how to make that happen?
@appleianer can clarify whatever wizardry is in use, but from the name of the dialog (DEVONthink Pro Office) and some of the icons, it looks like the v.2 dialog brought up by right-clicking a file in the Finder and invoking Services>Add to DEVONthink
Try it on your system. v3 has even more fun, with tags and search box!