Alfred Workflow for DT 3.x

Awesome! Thanks so much. Just a couple of issues:

  • Can’t get search-by-tag working.
  • Some notes are opened as HTML files in my web browser rather than in DT3.

Hi. I downloaded that workflow thanks but for some reason the tag searches are not working. When I type dnm and a tag nothing happens. If I press Command it just says open with devonthink.

Hello. I wrote the Alfred workflow you’ve mentioned. I think you have been running an old version of the package. At some point, I made the changes for DT3+Alfred 4. The version in GitHub should now work correctly out of the box.

2 Likes

Hello, I’ve installed the workflow as per the instructions. Works really well with files, but when I click on or hit enter on a folder nothing happens. I am on DT3 and Alfred 4?

I am on Alfred 4.6.5 and DEVONthink Search Workflow version is 7.4.

For me dnm command is not working. In Alfred workflow debug mode I see error message /usr/bin/python: No such file or directory.

167258103-bd3bfad4-24d2-4574-98f3-e5c788920837

To further add…
I followed Alfred python 2 monterey help link to install Python 2.7.18 and made sure it is available in $PATH.

Below terminal commands show my Python version and install location:

% ls -ld /usr/local/bin/python
lrwxr-xr-x  1 root  admin  48 Mar 28 12:29 /usr/local/bin/python -> /Users/mars/.pyenv/versions/2.7.18/bin/python2.7

% ls -ld /Users/mars/.pyenv/versions/2.7.18/bin/python2.7
-rwxr-xr-x  1 mars  staff  2112256 May  7 11:56 /Users/mars/.pyenv/versions/2.7.18/bin/python2.7

% python -V
Python 2.7.18

% which python
/usr/local/bin/python

My other Alfred workflows that are Python dependent seem to work fine.

When you’re running code that explicitly starts Python in a location where it’s not installed, this is what must happen. That you have Python installed somewhere else has nothing to do with it.

Simply modify the workflow so that it runs Python from where it’s installed.

1 Like

Thank you for this suggestion.

After modifying path to /usr/local/bin/python the workflow works as expected.

1 Like

JFTR: Apple is discontinuing support for scripting languages (Python, Perl, PHP). So they have to be installed manually.

OTOH, I do have a python3 in /usr/bin. I suppose that it came with XCode, perhaps the command line tools or something like that. In the case of the Alfred workflow, that doesn’t help either because the workflow uses /usr/bin/python, not /usr/bin/python3. Always a good idea to not rely on external tools being installed, I guess.

I too have /usr/bin/python3 but no /usr/bin/python.

I had initially thought of adding /usr/bin/python as symbolic link to /usr/local/bin/python but because of macOS’s System Integrity Protection feature /usr/ is off limits.

According to the code on github and what Alfred shows me, the workflow should use python3 on macOS > 12.3.

But that’s neither here nor there – you should take up the problems with this workflow with its author. They’re on github, so you could raise an issue there. The question if and where Python is or isn’t installed is not related to DT, so it’s off-topic here.

1 Like

Indeed and this is why we avoid scripting additions (osaxen), etc., as much as possible. Dependencies are one more thing that can break, may have to be maintained, and may not be present on all machines. We work with what’s built in.