Powerful tool for seaching in DEVONthink, for DEVONthink 3.x.
For DEVONthink 2.x, you can use the versions of this workflow before V7.0. Switch to Branch DEVONthink 2.x to access the README document and source code.
- Type
dnt + keywords
to search in all opened databases in Alfred. Search results are sorted by relevance score, consistent with DEVONthink. - Type
dnts + keywords
to search in DEVONthink window.- Press
Enter
to search in existing window. - Press
⌘Command + Enter
to search in a new window.
- Press
- Type
dnd
to choose which datebase to search- Press
Enter
, then type inkeywords
to search in the chosen database. - Press
⌘Command + Enter
to list all tags in the database, then choose a tag and pressEnter
to list all documents which have the tag. - Press
⌥Option + Enter
to list smart groups in the chosen database.
- Press
- Type
dnm + tag1, tag2, ...
to list all documents which have these tags in all database. Tags inputed must be exact. For example, TagaBcD
can't be inputed asaBc
orabcd
- Actions for Workspace:
- Type
dnw
to list all workspaces, pressEnter
to load the selected workspace. - Type
dnwa + WorkspaceName
to save current workspace namedWorkspaceName
.
- Type
- Type
dnf
to list favorites. - Type
dnsg
to list all smart groups in all opened databases.
After documents were listed,
- Press
Enter
to open the selected file with external editor. - Press
⌘Command + Enter
to open with DEVONthink. - Press
⌥Option + Enter
to reveal result in DEVONthink. - Press
→
,fn
, etc. to show file actions of Alfred. The keys are set inFeatures → File Search → Actions
of Alfred Preferences. - Press
Shift
or⌘Command + Y
toQuickLook
the selected file. - Press
⌘Command + C
to copy DEVONthink link (x-devonthink-item://xxxx) of the selected file. - Drag & Drop file in the result list to wherever you want.
dnt
and dnm
search in all opened databases. You can ignore some databases by setting ignoredDbUuidList
environment variable in Alfred workflow.
- Copy database link in DEVONthink, which is similar to
x-devonthink-item://1FC1A542-D8CA-4807-B806-8617966870B5
. - The part
1FC1A542-D8CA-4807-B806-8617966870B5
is the database's UUID. - Fill in workflow configuration with UUIDs. You should separate multiple UUIDs with comma(,).
You can set environment variable filterOutGroup
to yes
if you want to filter out group and tag.
Alfred will ask for Automation permission to control DEVONthink when you run the workflow for the first time. You should check up permission of Alfred controlling DEVONthink in System Preferences → Security & Privacy → Privacy → Automation
if the workflow doesn't work.
CJK (Chinese, Japanese, and Korean) characters should be added ~
in the front when seaching in DEVONthink. For example, searching keywords 你abc我他
should be converted to ~你abc~我他
. It's added automatically in DEVONthink Search
by using regular expression /([\u4e00-\u9fff]+)/g
to matching Chinese characters.
The regular expression can't match Japanese or Korean characters. You can research more perfect regular expressions which match CJK and tell me.