Dash-Alfred-Workflow icon indicating copy to clipboard operation
Dash-Alfred-Workflow copied to clipboard

Open source dashAlfredWorkflow for use with raycast

Open iloveitaly opened this issue 3 years ago • 2 comments

It would be great to be able to use the advanced action open -g "dash-advanced://snippet-name/Snippet/(null)" with raycast. Could you open source the ./dashAlfredWorkflow tool?

iloveitaly avatar Mar 11 '22 21:03 iloveitaly

Can you please describe what you're trying to do? The dashAlfredWorkflow tool is a very simple tool that just triggers a search within Dash and grabs the results using NSDistributedNotification and nothing more. It's a few lines of code.

This is pretty much it:

NSArray *arguments = [[NSProcessInfo processInfo] arguments];
NSString *term = [arguments objectAtIndex:1];
NSString *dashURL = [NSString stringWithFormat:@"dash-alfredworkflow://%@", term];
NSDistributedNotificationCenter *center = [NSDistributedNotificationCenter defaultCenter];
[center addObserver:workflow selector:@selector(resultsReceived:) name:dashURL object:nil];
[center postNotificationName:@"dash-alfredworkflow" object:dashURL userInfo:nil deliverImmediately:YES];

Kapeli avatar Mar 15 '22 21:03 Kapeli

I'm not sure what @iloveitaly's original purpose was, but right now the Raycast extention is having a hard time grabbing the correct doc keyword for specific docsets. Right now is uses pluginKeyword, which ends up feeding the wrong keyword to Dash a lot of the times.

For example when trying to search through the React docset, pluginKeyword—which equals javascript—is used, while the correct keyword is react:. Similar issues for pandas (python: instead of pandas:) and python3 (python: instead of python3:). @RSO does a better job of explaining it in https://github.com/raycast/extensions/issues/2452#issuecomment-1243825227.

Issues:

  • https://github.com/raycast/extensions/issues/2691
  • https://github.com/raycast/extensions/issues/2452

paw-lu avatar Sep 12 '22 16:09 paw-lu