The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   Creating new task directly in XML for WebDAV (http://forums.omnigroup.com/showthread.php?t=27959)

yuji 2013-01-24 02:46 PM

Creating new task directly in XML for WebDAV
 
I'd like to create a quick and dirty Android app that will allow me to create a new task for my Inbox, and upload it directly to my private WebDAV server. Looking at the XML file for adding a new task, it seems I need to create a valid task id and a rank. The other fields look pretty self explanatory.

Does anyone know how OmniFocus creates the task IDs, and if it's possible for me to safely create my own task ID in my own app?

Lizard 2013-01-25 12:31 PM

I'm gonna move this thread over to the Extras forum, as I think those folks are more likely to have the information you're looking for.

Brian 2013-01-25 12:57 PM

See [URL="http://forums.omnigroup.com/showpost.php?p=105247&postcount=3"]this post[/URL] for the info you're looking for.

My reading there is that you can generate your own TaskID, but you want to be careful not to generate one that conflicts with an existing ID. (Either one that OmniFocus generated, or one you generated yourself.)

I hope that helps, but please note that I am not an engineer, so take all of the above with a grain of salt. Or possibly a mole of grains. ;-)

yuji 2013-01-26 08:56 AM

Oh interesting. Let me give this a try. Thanks for the pointer!

yuji 2013-01-26 09:50 PM

Knowing the "old" task id
 
OK cool, it totally works. Thanks for the pointer! The one thing I don't understand is how to know which task id to use as the "old" task. In reading Ken's description of the naming convention, you follow the date stamp with old_id+new_id. But if I'm just adding a brand new item (not modifying an old transaction), how do I know what ID to use for the old_id?

Again, my use case here is that I plan to write a dead simple Android app that will allow me to quickly add a task directly to my webdav server, so my OmniFocus app will pick it up on the next sync.

If it all possible, I'd like to avoid having to read and parse the existing database.

whpalmer4 2013-01-27 01:38 AM

2 Attachment(s)
There's always a file named 0000... that is the root of the tree. Go there and follow the id links.

I compacted my database, so there was only the 0000... file, then added an action. You can how the new files were linked in in the attached screenshots.

yuji 2013-01-27 03:03 PM

[QUOTE=whpalmer4;119650]There's always a file named 0000... that is the root of the tree. Go there and follow the id links.

I compacted my database, so there was only the 0000... file, then added an action. You can how the new files were linked in in the attached screenshots.[/QUOTE]

Awesome, thanks whpalmer4!


All times are GMT -8. The time now is 11:18 PM.

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