Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A beta release? #2

Open
klochowicz opened this issue Mar 30, 2022 · 8 comments
Open

A beta release? #2

klochowicz opened this issue Mar 30, 2022 · 8 comments

Comments

@klochowicz
Copy link

Hi,
I've noticed that despite a lot o activity, there are no recent releases.
Have you considered creating a beta release? Or at least build instructions, that would help with beta testing.

I'd be happy to test it and give some feedback, as the old workflow stopped working on recent macOS :(

@rhydlewis
Copy link
Owner

rhydlewis commented Mar 30, 2022

Hi, thanks for offering to help - much appreciated.

This workflow relies on Node.js - instructions on how to install.

Try the following using the macOS Terminal:

  1. Install the beta workflow using npm
npm install --global alfred-search-omnifocus
  1. Open Alfred Preferences and disable the existing workflow "Search Omnifocus" by right clicking on it and unchecking Enabled
  2. Run Alfred command find-of-db to copy the path of the Omnifocus DB to your clipboard
  3. Run Alfred command set-of-db and then paste (⌘-V) the database path as an argument
  4. Run Alfred command .lt to see the list of Omnifocus tags

Let me know how you get on - cheers

@klochowicz
Copy link
Author

npm install --global alfred-search-omnifocus

thanks, I got it working!
I had to paste the result to set-of-db twice, somehow it didn't work the first time - for some reasons it appended newlines when copying/pasting (\n) - perhaps you could filter them out in set-of-db?
Worked the second time like a charm though.

I'll keep raising issues if I encounter any :)

@jarrodjob
Copy link

@rhydlewis
Thanks for all of this. Kinda a noob, but I think I am close. I get a "command not found" when running #3. I put my terminal/homebrew/node code below.

  1. Run Alfred command find-of-db to copy the path of the Omnifocus DB to your clipboard

rr221784@MacBook-Air ~ % npm install --global alfred-search-omnifocus
npm WARN deprecated xmldom@0.1.31: Deprecated due to CVE-2021-21366 resolved in 0.5.0
added 334 packages, and audited 335 packages in 41s
43 packages are looking for funding
run npm fund for details
5 vulnerabilities (1 moderate, 4 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run npm audit for details.
npm notice
npm notice New minor version of npm available! 8.5.5 -> 8.6.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.6.0
npm notice Run npm install -g npm@8.6.0 to update!
npm notice
rr221784@MacBook-Air ~ % find-of-db
zsh: command not found: find-of-db
rr221784@MacBook-Air ~ % find-of-db
zsh: command not found: find-of-db
rr221784@MacBook-Air ~ % npm install -g npm@8.6.0
changed 30 packages, and audited 201 packages in 791ms
10 packages are looking for funding
run npm fund for details
found 0 vulnerabilities

rr221784@MacBook-Air ~ % find-of-db
zsh: command not found: find-of-db
rr221784@MacBook-Air ~ % npm install --global alfred-search-omnifocus
npm WARN deprecated xmldom@0.1.31: Deprecated due to CVE-2021-21366 resolved in 0.5.0

changed 334 packages, and audited 335 packages in 36s
43 packages are looking for funding
run npm fund for details
5 vulnerabilities (1 moderate, 4 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run npm audit for details.
rr221784@MacBook-Air ~ % npm audit fix
npm ERR! code ENOLOCK
npm ERR! audit This command requires an existing lockfile.
npm ERR! audit Try creating one first with: npm i --package-lock-only
npm ERR! audit Original error: loadVirtual requires existing shrinkwrap file
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/rr221784/.npm/_logs/2022-04-13T22_28_41_287Z-debug-0.log
rr221784@MacBook-Air ~ % find-of-db
zsh: command not found: find-of-db
rr221784@MacBook-Air ~ % find-of-db
zsh: command not found: find-of-db
rr221784@MacBook-Air ~ % set-of-db
zsh: command not found: set-of-db

@klochowicz
Copy link
Author

klochowicz commented Apr 13, 2022

@rhydlewis Thanks for all of this. Kinda a noob, but I think I am close. I get a "command not found" when running #3. I put my terminal/homebrew/node code below.

try running find-of-db and set-of-db in Alfred window instead of the terminal, that should do the trick!

@jarrodjob
Copy link

try running find-of-db and set-of-db in Alfred window instead of the terminal, that should do the trick!

LOL. My dyslexia kicked in. I got it to work.

How I got there:

  • I tried your recommendation, and it didnt work.
  • I re-confirmed Node and Brew installed again.
  • Then re-installed and force fixed audits.
  • Then it worked (i saw a tell alfred window appear when i typed "find-of-db").

Thank you so much!!! Works

@AntonioKubala
Copy link

Hi. I follow all steps and achieved install all. Everything is right and now its running again. Thanks too much for your help. Soo usefull work. Its my first time trying install something out official apple Store software and I happy to be reach this results. Now I can work more productively again. Thanks and regards

@scottdellar
Copy link

I was using the Alfred Search Omnifocus JS workflow with input .t Comm to search for a tag called Communicate. When I selected the tag (Communicate), it crashed Omnifocus.

[11:33:58.597] Search OmniFocus JS[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Ealfred-search-omnifocus%3EB4C16BEE-8C76-4E0F-94C9-3B4A4600E3DC)] Queuing argument 'Comm'
[11:33:59.605] Search OmniFocus JS[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Ealfred-search-omnifocus%3EB4C16BEE-8C76-4E0F-94C9-3B4A4600E3DC)] Script with argv 'Comm' finished
[11:33:59.614] Search OmniFocus JS[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Ealfred-search-omnifocus%3EB4C16BEE-8C76-4E0F-94C9-3B4A4600E3DC)] {
	"items": [
		{
			"icon": {
				"path": "/Applications/OmniFocus.app/Contents/Resources/active-small@2x.png"
			},
			"title": "Communicate",
			"subtitle": "5 tasks available",
			"arg": "bOHVKqtLliG"
		}
	]
}

I couldn't reproduce the issue a few minutes later, but notice that it outputs Processing complete, where it didn't do so above.

[11:38:41.877] Search OmniFocus JS[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Ealfred-search-omnifocus%3EB4C16BEE-8C76-4E0F-94C9-3B4A4600E3DC)] Queuing argument 'Comm'
[11:38:42.487] Search OmniFocus JS[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Ealfred-search-omnifocus%3EB4C16BEE-8C76-4E0F-94C9-3B4A4600E3DC)] Script with argv 'Comm' finished
[11:38:42.493] Search OmniFocus JS[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Ealfred-search-omnifocus%3EB4C16BEE-8C76-4E0F-94C9-3B4A4600E3DC)] {
	"items": [
		{
			"icon": {
				"path": "/Applications/OmniFocus.app/Contents/Resources/active-small@2x.png"
			},
			"title": "Communicate",
			"subtitle": "5 tasks available",
			"arg": "bOHVKqtLliG"
		}
	]
}
[11:38:48.030] Search OmniFocus JS[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Ealfred-search-omnifocus%3EB4C16BEE-8C76-4E0F-94C9-3B4A4600E3DC)] Processing complete
[11:38:48.038] Search OmniFocus JS[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Ealfred-search-omnifocus%3EB4C16BEE-8C76-4E0F-94C9-3B4A4600E3DC)] Passing output 'bOHVKqtLliG' to [Open URL](alfredpreferences:workflows%3Eworkflow%3Ealfred-search-omnifocus%3EAF31DD30-B70F-483D-B427-64E543F58063)

I've since done a pretty thorough test of having Omnifocus in various states (focused mode, tags, projects, perspectives) and then using Search Omnifocus JS to jump into various different places. It has worked seamlessly. By the way, nice job on converting from Python to JavaScript!

@rhydlewis
Copy link
Owner

@scottdellar thanks for the feedback. I've never seen the workflow crash OF before so that's alarming. I designed it so that interaction with Omnifocus as an app is limited to AppleScript (but that's not used in this particular search). Very odd. I'll keep an eye out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants