View Single Post
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!