The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus for iPad
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Links from other apps to OmniFocus projects/contexts Thread Tools Search this Thread Display Modes
From the OF for Mac forum:

Quote:
Originally Posted by gshenaut View Post
I'd like to be able to quickly open the corresponding OmniFocus project. It turns out that there is a nifty feature in OmniFocus whereby if you control-click on the name of a project, one of the options is "copy as link". The result is a URL of the form "omnifocus:///task/jexW10LHv6C".
I'm wanting to do something similar but on the iPad there's no way to find out what the link is. I know I can create a link on the desktop and it still works on the iPad but if I create a new Context when I'm out I can't link to it.

I suppose my questions are:

1. Can Projects/Contexts ONLY be referenced by magic ID or is there some human friendly name I can use?

2. Is there some way to determine what the magic ID is from the ipad?

3. Is there a way to trigger an OmniFocus search from a URL? (that would be a fallback position).

4. What would cause the magic ID to change? If I embedded (say) omnifocus:///task/jexW10LHv6C all over my notes in another app, would moving or renaming the context invalidate the link?

Thanks.
 
Hi psidnell,

I also needed a way to link to my ever expanding scrapbooks, and asked a kindly Javascript expert for advice, but I found the workarounds provided time consuming and often flakey.

He suggested that instead of my wanting a reinvention of the wheel, I should ask an established notebook app developer if he would link to OmniFocus. I contacted Henrik at Undab and he added Send to OmniFocus (StOF) to Underscore Notify.

In the latest version (4.0) you can add unlimited OF action links to specific pages within each UN notebook.

I'm not entirely sure if this might be a solution for you, but maybe worth taking a look?
 
Quote:
Originally Posted by psidnell View Post
I'm wanting to do something similar but on the iPad there's no way to find out what the link is. I know I can create a link on the desktop and it still works on the iPad but if I create a new Context when I'm out I can't link to it.
Warning: some scenes may be too intense for younger viewers :-)

How dirty are you willing to get your hands? If the answer is "whatever it takes!" then you can get there from here with only your iPad. You'll need something that can snarf a .zip file off the sync server, unzip it and show you the contents. It'll be easier if you do this immediately after the creation of the new context, so you don't have to look through too many .zip files for the right one.

The operation that creates the new context will look something like this:
Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<omnifocus xmlns="http://www.omnigroup.com/namespace/OmniFocus/v1" app-id="com.omnigroup.OmniFocus.iPad" app-version="77.85.7.0.160289" os-name="iPhone OS" os-version="5.0.1" machine-model="iPad">
  <context id="mcpKcpNKugI">
    <added>2012-01-18T23:26:13.651Z</added>
    <name>Sample context, top-level</name>
    <rank>2147446199</rank>
  </context>
</omnifocus>
It will be more complicated if you've created a nested context, but what you need is the context id value for the block where it has the name of the new context. omnifocus:///context/<context-id> will be your new URL to get to that context (note there are 3 slashes after the "omnifocus:")

You can go to the WebDAV site in Safari on the iPad and open the OmniFocus.ofocus file and dig around. I was able to open the file and read the contents by sending the .zip file to GoodReader, copying out the string, assembling the URL in Safari and opening it. There may be better ways to do it, but I'm content with proving that it can be done :-)
Quote:
I suppose my questions are:

1. Can Projects/Contexts ONLY be referenced by magic ID or is there some human friendly name I can use?
Only the magic ID, which is what OmniFocus uses internally.
Quote:
2. Is there some way to determine what the magic ID is from the ipad?
See above.
Quote:
3. Is there a way to trigger an OmniFocus search from a URL? (that would be a fallback position).
Not that I recall.
Quote:
4. What would cause the magic ID to change? If I embedded (say) omnifocus:///task/jexW10LHv6C all over my notes in another app, would moving or renaming the context invalidate the link?
Because the magic ID is used to chain projects and contexts together, I think it won't ever change. Syncing would be pretty tricky otherwise!
 
Quote:
Originally Posted by endoftheQ View Post
I'm not entirely sure if this might be a solution for you, but maybe worth taking a look?
Thanks, but its primarily links to pre-existing projects/contexts I'm after.

I tend to maintain notes outside of OF since I want to keep them after the tasks are done, but maintaining a two way relationship is useful while work is in progress at least. Embedding links from OF to my notes is easy, but going the other way has to wait until I can get home, fire up the Mac and create the link with the desktop version of OO.
 
Quote:
Originally Posted by whpalmer4 View Post
Warning: some scenes may be too intense for younger viewers :-)

How dirty are you willing to get your hands? If the answer is "whatever it takes!" then you can get there from here with only your iPad. You'll need something that can snarf a .zip file off the sync server, unzip it and show you the contents. It'll be easier if you do this immediately after the creation of the new context, so you don't have to look through too many .zip files for the right one.
...
Thanks, I didn't think of that :-)

I suppose I could write a script that mounted the WebDAV sync directory, unzip the whole damn lot and grep/sed though it all to build a single reference text file of all the context names and ids every couple of weeks - my top level contexts are pretty stable.

I had tried mailing a task out of OF and sniffing though the attachment to see if there was anything useful hidden in it, but no.

It does seems like using a dinosaur killing asteroid to crack a nut though, makes waiting until I get home and fixing it on the mac seem quite appealing, but where's the challenge in that :-)
 
Quote:
Originally Posted by psidnell View Post
Thanks, I didn't think of that :-)

I suppose I could write a script that mounted the WebDAV sync directory, unzip the whole damn lot and grep/sed though it all to build a single reference text file of all the context names and ids every couple of weeks - my top level contexts are pretty stable.

I had tried mailing a task out of OF and sniffing though the attachment to see if there was anything useful hidden in it, but no.

It does seems like using a dinosaur killing asteroid to crack a nut though, makes waiting until I get home and fixing it on the mac seem quite appealing, but where's the challenge in that :-)
Hey, if you're going to write that script, it might as well run every time the database changes, and mail you a neat list of new project and context ids in URL form for your pasting pleasure!

It might be easier, though, to use AppleScript, where you could just take the flattened lists of contexts and projects and spit out the ids, rather than trying to do it with anything where you need to parse the files yourself. Someone has already written that code, might as well take advantage of their work!

A bit of code:
Quote:
tell application "OmniFocus"
tell default document
set AllContexts to flattened contexts
set lastContext to last item of AllContexts
set AllProjects to flattened projects
set lastProject to last item of AllProjects
display alert "Last created context: " & return & " " & name of lastContext & return &
" with id: " & id of lastContext & return &
"Last created project:" & return & " " & name of lastProject & return &
" with id: " & id of lastProject
end tell
end tell
 
Thanks, I'll give that a go.
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Omnifocus 2 Projects and Contexts need to be sortable usertech OmniFocus 1 for Mac 33 2013-02-26 07:53 PM
Fixing Google Apps Gmail Links After Transition justin OmniFocus 1 for Mac 1 2011-07-25 05:00 PM
OmniFocus Alpha vs Various GTD Apps ueila OmniFocus 1 for Mac 41 2008-08-27 05:26 AM
Feature Suggestions: Context Planner and Links to Maps for Contexts russdquinn OmniFocus for iPhone 1 2008-07-11 09:56 AM
Passing feed:// links off to other Apps Chris McElligott OmniWeb Feature Requests 8 2006-04-06 12:34 PM


All times are GMT -8. The time now is 04:01 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.