Jump to content

Alfred -> DEVONthink


Recommended Posts

Posted

Say there is a .doc file in DevonThink.

Alfred finds that file.

 

Now how can that file be revealed in DevonThing?

 

It seems that it is only possible to open the found file which opens Word?

 

 

Posted

Updated to 1.4.1 https://github.com/dvcrn/alfred-devonthink/releases/tag/v1.4.1

 

Uses score correctly now and the results are pretty good! Really liking this new search. 

I reduced the results per DB to 5 which seems a good sweetspot to not be too slow. If that's not enough you can change the value inside devonsearch.js

 

I tried to replicate what @sokolik_22 said but even for files that are not supported by DEVONthink, when I hit enter it just shows it in a DEVONthink window and doesn't open it in a different application. From there you can hit CMD-R and it will reveal the file inside DEVONthink

Posted

Updated to 1.4.1 but my search results still seem random. I type the exact full title of an item and it doesn't even show in the results. I think part of the issue is that, as far as I can tell, the results list is only based on the first search term. Adding a second word to the search doesn't update the search results.

Posted

@dvcrn After update, it works ok.

 

1. Search in Alfred: "ds <item>"

2. [Enter] on the found item in the Alfred list

–> The item opens in DevonThink

 

Remarks:

1. The search does not ignore diacritics. If there is "Ramón" in DevonThink, searching for "ds ramon" in Alfred does not reveal the "Ramón" DT item.

2. It searches also in Trash which I think is not handy.

 

Anyway, nice workflow!

 

Jiri

 

 

Posted
7 hours ago, gr37 said:

Updated to 1.4.1 but my search results still seem random. I type the exact full title of an item and it doesn't even show in the results. I think part of the issue is that, as far as I can tell, the results list is only based on the first search term. Adding a second word to the search doesn't update the search results.

 

Hrrm, can you tell me what it passes to the script? Open the workflow in alfred and hit the little bug icon on the top right. Then change "Interesting Information" to ""All Information" and execute the workflow while having that window open

  • 2 months later...
Posted (edited)

@dvcrn @gr37 I experienced the same issue -- the search only uses the first word of the query and ignores any subsequent words. I think this is because multi-word queries are passed into devonsearch.js as multiple command line parameters, but devonsearch.js appears to only use the first one (line 38):

const query = argv[0];

I fixed the issue by changing the ds keyword script filter from "with input as argv" to "with input as query" and changing the bash command to this:

osascript ./devonsearch.js "{query}"

This ensures the full query is passed to devonsearch.js as a single command line parameter.

 

Nice workflow -- a very convenient way to interact with your content in DEVONthink. Thank you for sharing.

Edited by pwharrison
Posted
16 hours ago, pwharrison said:

@dvcrn @gr37 I experienced the same issue -- the search only uses the first word of the query and ignores any subsequent words. I think this is because multi-word queries are passed into devonsearch.js as multiple command line parameters, but devonsearch.js appears to only use the first one (line 38):


const query = argv[0];

I fixed the issue by changing the ds keyword script filter from "with input as argv" to "with input as query" and changing the bash command to this:


osascript ./devonsearch.js "{query}"

This ensures the full query is passed to devonsearch.js as a single command line parameter.

 

Nice workflow -- a very convenient way to interact with your content in DEVONthink. Thank you for sharing.

 

Thank you! I updated the workflow with this and released version 1.4.2. It should auto-update sometime 

Posted (edited)
17 hours ago, pwharrison said:

I fixed the issue by changing the ds keyword script filter from "with input as argv" to "with input as query" and changing the bash command to this:


osascript ./devonsearch.js "{query}"

This ensures the full query is passed to devonsearch.js as a single command line parameter.

 

The problem isn't $1 vs {query}, it's the lack of quotes (Alfred only ever passes a single argument to Script Filters. bash is splitting it into multiple arguments.)

 

$1 is preferred over {query}: Alfred doesn't need to re-write the script every time, and you don't have to worry about the escaping options (which are currently incorrect, btw: you also need to check Dollars).


So, the preferred way would be:

osascript ./devonsearch.js "$1"

 

Edited by deanishe
  • 4 months later...
Posted (edited)

How do you import 1.4.2 into Alfred? Changing extension in the info does not work.
 

While waiting for a reply, a simple solution is to add a file filer workflow with search scope limited to "~/Library/Metadata/com.devon-technologies.think3"

Edited by slyfox
  • 1 month later...
Posted

Stumbled across this workflow, and ... it's awesome !! Installed !!

 

Future feature request, if you're up for it: a way to enter multi-line note, or at least title and body lines, perhaps using some separator as a convention for this, or some other Alfred workaround ...

 

 

Posted (edited)

It does. Though, I think the workflow was updated recently? It's suddenly running quite slowly for me.

Edited by lutefish
wording
Posted

Most of the stuff works with DT3 but the search currently doesn't. The applescript needs updating to call the correct app and didn't get around to doing that yet. A hotfix is to just change the name inside the script to "DEVONthink 3" until DT3 is fully released

  • 1 year later...
Posted

Sorry, but I don't have any computer skills. Where can I find the workflow with extension ".alfredworkflow". Thank you

Posted
8 hours ago, 2pilvic said:

Sorry, but I don't have any computer skills. Where can I find the workflow with extension ".alfredworkflow". Thank you

 

@dvcrn has forgotten to add the file to the release.

Posted
13 hours ago, deanishe said:

 

@dvcrn has forgotten to add the file to the release.

On the download website (https://github.com/dvcrn/alfred-devonthink/releases) only “source code (zip)” and “source code (tar.gz)" appear. I don't know how to install through those folders. I have always used ".alfredworkflow". Thank you very much

Posted
20 minutes ago, 2pilvic said:

On the download website (https://github.com/dvcrn/alfred-devonthink/releases) only “source code (zip)” and “source code (tar.gz)" appear. I don't know how to install through those folders. I have always used ".alfredworkflow". Thank you very much

 

That's what I mean: @dvcrn has forgotten to add the .alfredworkflow file to the downloads.

Posted
1 hour ago, dvcrn said:

Oh yeah, looks like I forgot. I'll see if I can find some time later to add it

sincerely, thank you very much

  • 1 month later...
  • 4 months later...
Posted

cool stuff and highly appreciated. I love Alfred and the vast workflow environment, however, I cannot code whatsoever.... thus, thanks again for sharing!

  • 1 month later...
Posted

I'm also looking for a way to add snapshots in my clipboard into DV in using the workflow.  Could it be possible?   Also, do you have any details how to use this feature? ->  Import To DEVONthink -   

what will be keywords to use "Import To DEVONthink"?  

I can use "ds" and "dn" for search and create new.  but, not sure what to do for "Import To DEVONthink". 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...