rhydlewis / search-omnifocus Goto Github PK
View Code? Open in Web Editor NEWAlfred workflow that allows free text searching of OmniFocus tasks
Alfred workflow that allows free text searching of OmniFocus tasks
Email from Jos van der Voort:
Hi there,
I have installed the Alfred OF search workflow by your hand. The .s workflow does not seem to work as it does not return any results. I checked the .c the .f and the .p commands. They all seem to work. I am using a localized version of OF (Dutch).
Could that be the reason why it does not work?
Thanks for looking into this.
Jos
VERSION_KEY='of_version' does not work, so I removed version checking to make it work.
Also line 102 of factory.py should add "Z" like:
due_date = parse_datetime(row[DUE_DATE]+"Z")
Is there anyway to add a task to omnifocus through this workflow ?
other side question, how can i list all my tasks ?
Thanks for this awesome workflow
Hi there, I noticed it's no longer working on El Capitan. Is it just an isolated issue with mine?
Hi,
I simply and successfully modified the ".f script filter" in the workflow. I added a "run NSAppleScript action" connected to the script filer ".f" through the "command modifier". The script is as follows:
on alfred_script(q)
tell application "OmniFocus" to tell the default document
set folderList to flattened folders whose id is q
tell the front document window to set focus to folderList
activate
end tell
end alfred_script
Thanks for making this great workflow! For some time I've hade some issues with showing selected projects in OmniFocus.
Sometimes OmniFocus shows the message "Unable to show linked item: There is no item with the unique identifier given in the link." when I want to show the project found with the workflow. This affects only certain projects. I have not been able to track down any differences between the projects that can be shown in OmniFocus (this is the vast majority) and the ones that don't show up and generates the above error message (a minority of projects).
I organise a lot of my tasks like this:
When searching tasks with .s <query>
, "Parent task" doesn't show up in the results. All subtasks are there, however. I like to navigate straight to "Parent task", as the subtasks are often obscure things like document names that I can't remember.
Similarly, project folders don't show up anywhere in the results, but that's not a huge deal as, unlike a lot of my tasks, I can remember project names.
I'm running into a 100% CPU hang from the alfred workflow update in this plugin, which looks like this bug deanishe/alfred-workflow#111
It looks like 1.9 is the current version in this plugin https://github.com/rhydlewis/search-omnifocus/blob/master/workflow/update.py
And 1.26 is available https://github.com/deanishe/alfred-workflow/releases
I might try seeing if I can get a PR going...
The workflow is unable to find projects whose name starts with the Swedish character "Å", e.g. if I search for "årsvis" the project "Årsvis..." does not show up. However, the project is found if I enter upper case "Å", i.e. I search for "Årsvis".
Hi there, I've recently installed the Omnifocus Enterprise (one from Appstore, not from Omnifocus´site) and it the plug-in doesn't appear to be able to pull content from the database. Kindly ask for your help looking into the matter, please! Cheers!
Screenshot attached here.
https://transfer.sh/1sZBMLW/Screenshot%202021-07-31%20at%2017.31.04.png
I think it's been out long enough that it could be the default
Happy to try to PR this if you want
I have tried to get this workflow to load in Alfred to no avail. I tried the latest release and the one prior as well as cloning the repo and manually compiling, but not sure what else to try.
This is very much a personal preference, but I dislike being dropped into Alfred's fallback searches when using a workflow. Mostly because it's hard to tell if that means there are no results or that the workflow crashed.
Would you consider showing a "No matching results" item when there are no results?
Since I've upgraded to OmniFocus 3, I get an error "unable to open database file" when searching with this workflow.
macOS Catalina v10.15.4
Alfred 3.8.6[972]
After the update, this workflow is not worked.
"Workflow incompatible. Please update to the latest version of Alfred. "
I have tried: v2.1.1 2.1.0 2.0.5
They show the same message……
Could you tell me which version can be used on Alfred 3.8.6[972]?
OR is there any problem??? Cause you didn't say Alfred 3 is never supported on release log.
Great workflow! It would be nice if you could do .c to search for a context.
I'm testing the beta of 3.
Would it make sense to update the .c
keyword to .t
now that Contexts have been replaced by Tags?
It would be great if I could complete the task by actioning it with Cmd modifier for example.
I just updated OF3 and found I need to update my workflow. I'm so glad you have kept updating this workflow!
I downloaded the 2.0.3 release from github, but when using this version inside Alfred, the alfred "workflow update" plugin thing kept popping up.
It looks like in the 2.0.3 binary, the 'version' file is still tagged as 2.0.2. Did something get messed up during upload? Maybe just doublecheck that I'm not crazy?
https://github.com/rhydlewis/search-omnifocus/releases/download/v2.0.3/Search.OmniFocus.v2.0.3.alfredworkflow
I was using Search OmniFocus in Alfred 4 without any issues, but it stopped working when I upgraded to Alfred 5. Specifically, when I perform a search, it shows the default search engines (e.g. Google) instead of results from the OmniFocus database.
Thanks for looking into this! Hopefully, it will be an easy fix.
How about searching flagged items?
Trigger could be .f
Hey, thanks for this plugin, I think it's a great idea!
I can't get the default icons for tasks, as shown in the README, to show up. Any idea what could be going on or are icons something that always need to be manually setup?
Here is ".lc" search: http://asktherelic.com/priv/20150912-1116-8o9m6.png
The default icons are working though... http://asktherelic.com/priv/20150912-1117-s551y.png
This is with Alfred 2 latest (2.7.2) and your plugin latest (v1.1.9)
I have some perspectives starting with a emoji, such as 🔬 or 💻. .v & .lv returns "'acsii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)"
Hi, great workflow — thanks for making it :) This really makes OF much more accessible! I just installed it and noticed what the title says: listing inbox items also show completed items. A quick solution for this is to use "File > Move old data to archive" which resolves the issue if you then actually move the data… I didn't even know that this option existed so I wanted to let you know about the issue, and anyone else that there is a quick workaround.
Thanks again for this awesome workflow!
Occasionally I'll create a quick todo in the inbox, but then quickly change my mind.
You should be able to get a list of recently changed items, right? Being able to quickly get a list of your last changed items would be nice, to quickly jump back to something.
In Alfred, type:
.s e
Alfred says "Searching..."
In terminal, type:
ps aux | grep python
to see:
python search.py e
still running.
Note, running python script from workflow folder works. Alfred debug log doesn't seem to show anything happening. Odd.
Hi,
When attempting to search using .s or .sa does not find results, but shows a warning:
Error in workflow 'Search OmniFocus'
time data does not match format '%Y-%m-%dT%H:%M:%S.%fZ'
Using:
Can you please post the .workflow
file for the latest release?
I just installed the Omnifocus workflow for Alfred. Unfortunately, it can't find the database.
This may or may not be related to issue #12.
I'm running Alfred 3.1, and OmniFocus 2.6.2.
The database is in fact in /Users/freek/Library/Containers/com.omnigroup.OmniFocus2/Data/Library/Caches/com.omnigroup.OmniFocus2/OmniFocusDatabase2
. (The non-MAS location). Looking at the code, I see that it looks in two locations. Why it has not found it, I don't know yet.
Let me know if there is a particular way to debug this.
[2016-09-06 08:31:08][ERROR: input.scriptfilter] Code 1: 08:31:08 workflow.py:1972 DEBUG Workflow version : 1.1.11
08:31:08 workflow.py:1387 DEBUG Reading settings from `/Users/freek/Library/Application Support/Alfred 3/Workflow Data/net.rhydlewis.alfred.searchomnifocus/settings.json` ...
08:31:08 workflow.py:2233 DEBUG Update check not due
08:31:08 search.py:36 DEBUG Started workflow
08:31:08 search.py:133 DEBUG [u'freek']
08:31:08 workflow.py:1610 DEBUG Loading cached data from : /Users/freek/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/net.rhydlewis.alfred.searchomnifocus/__workflow_update_status.cpickle
08:31:08 workflow.py:2181 DEBUG update_data : {u'available': True, u'version': u'v1.1.15', u'download_url': u'https://github.com/rhydlewis/search-omnifocus/releases/download/v1.1.15/Search.OmniFocus.v1.1.15.alfredworkflow'}
08:31:08 search.py:118 DEBUG Searching tasks
08:31:08 workflow.py:1511 DEBUG Data `db_path` stored in `cpickle` format
08:31:08 workflow.py:1526 DEBUG Stored data loaded from : /Users/freek/Library/Application Support/Alfred 3/Workflow Data/net.rhydlewis.alfred.searchomnifocus/db_path.cpickle
08:31:08 search.py:169 DEBUG /Users/freek/Library/Containers/com.omnigroup.OmniFocus2.MacAppStore/Data/Library/Caches/com.omnigroup.OmniFocus2.MacAppStore/OmniFocusDatabase2
08:31:08 workflow.py:1990 ERROR unable to open database file
Traceback (most recent call last):
File "/Users/freek/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.94461B96-1AB4-4831-8683-286AFDA280C2/workflow/workflow.py", line 1983, in run
func(self)
File "search.py", line 47, in main
get_results(sql, args.type)
File "search.py", line 55, in get_results
results = run_query(sql)
File "search.py", line 171, in run_query
conn = sqlite3.connect(db_path)
OperationalError: unable to open database file
08:31:08 workflow.py:2008 DEBUG Workflow finished in 0.104 seconds.
Sometimes I don't know whether the text I'm looking for is in a task's notes or its title, and I'd like to be able to search both.
Was I imagining things? Is there a workflow variable that might change the behavior?
I ask this because if I've only got one OF window open deep into some view or project, and I want to search for another item, I hate getting my original location/context blown away...
I'm using OF3 on High Sierra.
Thanks! Great workflow. Thanks for writing and sharing it.
After upgrading to OmniFocus 3.5, my OmniFocus database moved from:
/Library/Containers/com.omnigroup.OmniFocus3/Data/Library/Application Support/OmniFocus/OmniFocus Caches/OmniFocusDatabase
/ /Library/Containers/com.omnigroup.OmniFocus3.MacAppStore/Data/Library/Application Support/OmniFocus/OmniFocus Caches/OmniFocusDatabase
to:
/Library/Group Containers/34YW5XSRB7.com.omnigroup.OmniFocus/com.omnigroup.OmniFocus3/com.omnigroup.OmniFocusModel/OmniFocusDatabase.db
/
/Library/Group Containers/34YW5XSRB7.com.omnigroup.OmniFocus/com.omnigroup.OmniFocus3.MacAppStore/com.omnigroup.OmniFocusModel/OmniFocusDatabase.db
The 34YW5XSRB7
looks randomly/uniquely generated so will need to think about how to solve this.
34YW5XSRB7
is OmniGroup's container/team ID - think it's safe to assume this will be the same for everyone
Search OmniFocus workflow continues to show results from OmniFocus created before upgrading but nothing added or changed after upgrading.
OmniFocus Database
find ~/Library/Group\ Containers/ -name "OmniFocusDatabase.db"
Workflow
search.py
in a text editorOF3_DB_LOCATION=...
OF3_DB_LOCATION = "<text you copied above 👆>"
When performing any search, such as .sa buy
or .s buy
Alfred will display the following error: Unable to open database file
.
Is this release incompatible with Omnifocus 2? I don't really see what other issue could be.
The workflow does not work when searching for words with international characters (e.g. Swedish characters Å, Ä and Ö).
I have found that tasks that inherit completion from their parent still appear active which is annoying for some of my procedural repeating checklists where I often check off the parent without checking all of the children.
I've noticed that search-omnifocus does not find all tasks. I had the impression it did not find newer items in the inbox. After a bit debugging, it seems that search-omnifocus runs the following query:
cd ~/Library/Containers/com.omnigroup.OmniFocus2/Data/Library/Caches/com.omnigroup.OmniFocus2
sqlite3 OmniFocusDatabase2 SELECT t.persistentIdentifier, t.name, t.dateCompleted, t.blockedByFutureStartDate, c.name, p.name, t.flagged, t.dateToStart, t.inInbox, t.effectiveInInbox, t.effectiveDateToStart, t.childrenCountAvailable, t.blocked, pi.status, t.effectiveFlagged, t.dateModified, t.containingProjectInfo FROM ((task tt left join projectinfo pi on tt.containingprojectinfo=pi.pk) t left join task p on t.task=p.persistentIdentifier) left join context c on t.context = c.persistentIdentifier WHERE lower(t.name) LIKE lower('%query%') AND t.dateCompleted IS NULL AND t.containingProjectInfo <> t.persistentIdentifier ORDER BY t.name ASC
I could resolve this problem by removing the part AND t.containingProjectInfo <> t.persistentIdentifier
from the query. In that case, new tasks in the Inbox are found too.
I run the query on some sample data, and got this result:
t.containingProjectInfo | t.persistentIdentifier | t.name | c.name | p.name | t.inInbox | t.blocked | pi.status |
---|---|---|---|---|---|---|---|
brCwH7ATZfq | brCwH7ATZfq | Search-omnifocus project | Search-omnifocus project | 0 | 1 | active | |
brCwH7ATZfq | n2o7OKloiCc | search-omnifocus group of tasks | Search-omnifocus project | 0 | 1 | active | |
kSqW6_0Fod8 | search-omnifocus in inbox, no project or context | 1 | 0 | ||||
hTVJT1AKEjJ | search-omnifocus in inbox, project and context | 1 | 0 | ||||
gXj1JOu9LJx | search-omnifocus in inbox, project, no context | 1 | 0 | ||||
oOivpkdUhPX | gaIYqG87cY8 | search-omnifocus with project and context | Offline | Bug Report | 0 | 0 | active |
oOivpkdUhPX | n6jvdmfMr3O | search-omnifocus with project and no context | Bug Report | 0 | 0 | active |
It seems that this part of the query is ment to prevent names of projects to be found. Unfortunately t.containingProjectInfo <> t.persistentIdentifier
also seems to be false if t.containingProjectInfo
is NULL and t.persistentIdentifier
is not. One way to solve this is to change this part of the query to (t.containingProjectInfo <> t.persistentIdentifier OR t.containingProjectInfo IS NULL)
:
sqlite3 OmniFocusDatabase2 "SELECT t.persistentIdentifier, t.name, t.dateCompleted, t.blockedByFutureStartDate, c.name, p.name, t.flagged, t.dateToStart, t.inInbox, t.effectiveInInbox, t.effectiveDateToStart, t.childrenCountAvailable, t.blocked, pi.status, t.effectiveFlagged, t.dateModified, t.containingProjectInfo FROM ((task tt left join projectinfo pi on tt.containingprojectinfo=pi.pk) t left join task p on t.task=p.persistentIdentifier) left join context c on t.context = c.persistentIdentifier WHERE lower(t.name) LIKE lower('%query%') AND t.dateCompleted IS NULL AND (t.containingProjectInfo <> t.persistentIdentifier OR t.containingProjectInfo IS NULL) ORDER BY t.name ASC
Hi,
I installed Search.OmniFocus.v2.0.6.alfredworkflow and found Alfred shows "Workflow Incompatible.Please update to the latest version of Alfred", but it is the latest version.
I've been having this issue for a while: no results returned for custom perspectives with .v or .lv. The only result returned are for default perspectives. Just did a fresh re-install of the workflow, and ran the "use-of-3" because I am on OmniFocus 3.2.1 (v122.6 r325053). I can't see what the problem is.
First off, love this workflow! Thank you for your work on it!
Right now, if I have a project called "Finish raking leaves," and I try to search via the workflow for "Finish leaves" (no quotes), I get zero results. Any possibility of implementing a "fuzzier" search algorithm that would pick up matches, even if they're split across a string?
Again, thanks for this tool!
Hi, I am not sure if this is intentional. but from the statement "Search for all tasks within OmniFocus (irrespective of status) with .s:", I assume it will search task in inbox too, which is not the case on my side. ".i" works perfectly though. If it is intentional behavior, can you define another keyword for "truely search for all tasks"?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.