emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org Mode TOOD two way sync tool
@ 2012-06-22  6:40 Sriram Karra
  2012-06-22 12:03 ` Christopher J. White
  2012-10-07 19:48 ` Jonathan BISSON
  0 siblings, 2 replies; 12+ messages in thread
From: Sriram Karra @ 2012-06-22  6:40 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1323 bytes --]

I am the author of ASynK (http://karra-asynk.appspot.com), a PIM sync tool
and framework written in python that works across a variety of PIM
providers such as Outlook, Google and BBDB. I am considering extending
ASynK to do a bi-directional sync of Outlook tasks to Org Mode tasks. To be
able to do this I need a working read/write API for reading and creating
TODOs in org mode.

*"Offline parsers"*

My first preference is to be able to parser org files without required
Emacs - this is the approach that I have implemented for BBDB sync. I
considered PyOrgMode (https://github.com/bjonnh/PyOrgMode/network), but it
appears unable to process TODOs, or even recurring events. To be able to
extend PyOrgMode so I can read and write TODOs, I needed a full description
of the format of TODO entries in all its forms. The Org manual itself has
this information, I'm sure but scattered all over the place, given its real
audience. Can someone point me to some sort of a concise representation, if
any, of the org file format grammar?

*org-protocol*
*
*
By quickly reading the documentation I figured that org-protocol can be
used to create entries, but is there a way to use it to do generic queries
like "list all TODOs in a specified file, with a particular property value"
and such?

Any help is much appreciated.

-Karra

[-- Attachment #2: Type: text/html, Size: 1615 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Org Mode TOOD two way sync tool
  2012-06-22  6:40 Org Mode TOOD two way sync tool Sriram Karra
@ 2012-06-22 12:03 ` Christopher J. White
  2012-06-22 12:33   ` Sriram Karra
  2012-10-07 19:48 ` Jonathan BISSON
  1 sibling, 1 reply; 12+ messages in thread
From: Christopher J. White @ 2012-06-22 12:03 UTC (permalink / raw)
  To: emacs-orgmode

Hi Karra,

I've been working on org-toodledo.el to perform bi-directional sync of 
TODO items with the Toodledo server, and faced many of the same issues 
you raise about figuring out the exact format and grammar of a TODO item.

You may find looking at my source useful, either as inspiration, 
integration, or just understanding what fields are what.

The general approach was to build an object that represents a parsed 
TODO item, and fill that in from either the org-buffer TODO items, or 
from items retrieved from the server.  That object can then be compared 
to others (one from the server and one from the local buffer), converted 
to a new org TODO, sent to the server as a new TODO, etc.  The 
components of the TODO item are obviously targeted to what makes sense 
for Toodledo, but I think they are fairly generic.

You might also look at org-element.el which I recently learned about 
which may also help.  I have it on my TODO list to learn more about it 
to see if I can't refactor org-toodledo to leverage it.  It is more 
geared toward generic org items as opposed to specifically TODO items.

...cj

On 6/22/12 2:40 AM, Sriram Karra wrote:
> I am the author of ASynK (http://karra-asynk.appspot.com), a PIM sync
> tool and framework written in python that works across a variety of PIM
> providers such as Outlook, Google and BBDB. I am considering extending
> ASynK to do a bi-directional sync of Outlook tasks to Org Mode tasks. To
> be able to do this I need a working read/write API for reading and
> creating TODOs in org mode.
>
> *"Offline parsers"*
>
> My first preference is to be able to parser org files without required
> Emacs - this is the approach that I have implemented for BBDB sync. I
> considered PyOrgMode (https://github.com/bjonnh/PyOrgMode/network), but
> it appears unable to process TODOs, or even recurring events. To be able
> to extend PyOrgMode so I can read and write TODOs, I needed a full
> description of the format of TODO entries in all its forms. The Org
> manual itself has this information, I'm sure but scattered all over the
> place, given its real audience. Can someone point me to some sort of a
> concise representation, if any, of the org file format grammar?
>
> *org-protocol*
> *
> *
> By quickly reading the documentation I figured that org-protocol can be
> used to create entries, but is there a way to use it to do generic
> queries like "list all TODOs in a specified file, with a particular
> property value" and such?
>
> Any help is much appreciated.
>
> -Karra

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Org Mode TOOD two way sync tool
  2012-06-22 12:03 ` Christopher J. White
@ 2012-06-22 12:33   ` Sriram Karra
  2012-06-22 14:05     ` Christopher J. White
  0 siblings, 1 reply; 12+ messages in thread
From: Sriram Karra @ 2012-06-22 12:33 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 3022 bytes --]

Chris, thanks for the pointer to org-toodledo. Does org-toodledo's handle
all the options and formats of possible TODOs supported by org mode? Are
you yet to implement support for anything that is parsed by the Emacs
org-mode?

On Fri, Jun 22, 2012 at 5:33 PM, Christopher J. White <
orgmode@grierwhite.com> wrote:

> Hi Karra,
>
> I've been working on org-toodledo.el to perform bi-directional sync of
> TODO items with the Toodledo server, and faced many of the same issues you
> raise about figuring out the exact format and grammar of a TODO item.
>
> You may find looking at my source useful, either as inspiration,
> integration, or just understanding what fields are what.
>
> The general approach was to build an object that represents a parsed TODO
> item, and fill that in from either the org-buffer TODO items, or from items
> retrieved from the server.  That object can then be compared to others (one
> from the server and one from the local buffer), converted to a new org
> TODO, sent to the server as a new TODO, etc.  The components of the TODO
> item are obviously targeted to what makes sense for Toodledo, but I think
> they are fairly generic.
>
> You might also look at org-element.el which I recently learned about which
> may also help.  I have it on my TODO list to learn more about it to see if
> I can't refactor org-toodledo to leverage it.  It is more geared toward
> generic org items as opposed to specifically TODO items.
>
> ...cj
>
>
> On 6/22/12 2:40 AM, Sriram Karra wrote:
>
>> I am the author of ASynK (http://karra-asynk.appspot.**com<http://karra-asynk.appspot.com>),
>> a PIM sync
>> tool and framework written in python that works across a variety of PIM
>> providers such as Outlook, Google and BBDB. I am considering extending
>> ASynK to do a bi-directional sync of Outlook tasks to Org Mode tasks. To
>> be able to do this I need a working read/write API for reading and
>> creating TODOs in org mode.
>>
>> *"Offline parsers"*
>>
>>
>> My first preference is to be able to parser org files without required
>> Emacs - this is the approach that I have implemented for BBDB sync. I
>> considered PyOrgMode (https://github.com/bjonnh/**PyOrgMode/network<https://github.com/bjonnh/PyOrgMode/network>),
>> but
>> it appears unable to process TODOs, or even recurring events. To be able
>> to extend PyOrgMode so I can read and write TODOs, I needed a full
>> description of the format of TODO entries in all its forms. The Org
>> manual itself has this information, I'm sure but scattered all over the
>> place, given its real audience. Can someone point me to some sort of a
>> concise representation, if any, of the org file format grammar?
>>
>> *org-protocol*
>> *
>>
>> *
>> By quickly reading the documentation I figured that org-protocol can be
>> used to create entries, but is there a way to use it to do generic
>> queries like "list all TODOs in a specified file, with a particular
>> property value" and such?
>>
>> Any help is much appreciated.
>>
>> -Karra
>>
>
>
>

[-- Attachment #2: Type: text/html, Size: 3679 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Org Mode TOOD two way sync tool
  2012-06-22 12:33   ` Sriram Karra
@ 2012-06-22 14:05     ` Christopher J. White
  2012-06-24 13:15       ` Aurélien Aptel
  0 siblings, 1 reply; 12+ messages in thread
From: Christopher J. White @ 2012-06-22 14:05 UTC (permalink / raw)
  To: emacs-orgmode

Hi Karra,

On 6/22/12 8:33 AM, Sriram Karra wrote:
> Chris, thanks for the pointer to org-toodledo. Does org-toodledo's
> handle all the options and formats of possible TODOs supported by org
> mode?

That's a loaded question ;-)  I'd have to say probably not, but it so 
far supports all of my TODOs.  Brief list of properties handled:

   * TODO state
   * DEADLINE / SCHEDULED with repeaters
   * CLOSED
   * tags
   * Effort
   * hierarchy
   * folder (toodledo folders, that is) - map to a heading

I'd say extending support to other properties wouldn't be too hard if 
it's a direct mapping that doesn't involve too much logic.

> Are you yet to implement support for anything that is parsed by
> the Emacs org-mode?

I'm not sure what you mean -- are you referring to org-element?  If not, 
can you clarify?

...cj

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Org Mode TOOD two way sync tool
  2012-06-22 14:05     ` Christopher J. White
@ 2012-06-24 13:15       ` Aurélien Aptel
  2012-06-24 13:17         ` Aurélien Aptel
  2012-06-24 17:07         ` Christopher Allan Webber
  0 siblings, 2 replies; 12+ messages in thread
From: Aurélien Aptel @ 2012-06-24 13:15 UTC (permalink / raw)
  To: orgmode; +Cc: emacs-orgmode

Hi,

I'm working on a bugtracker sync tool for org-mode [1]. I'm using
org-element to parse org files, it does everything I need.

It turns this


* TODO blah <2012-06-25>
:PROPERTIES:
:foo: bar
:END:
Foo bar

into this:

(org-data nil
          (headline
           (:raw-value "blah <2012-06-25>" :title
                       ("blah "
                        (timestamp
                         (:type active :value "<2012-06-25>")))
                       :level 1
                       :todo-keyword "TODO"
                       :todo-type todo
                       :timestamp "2012-06-25"
                       :foo "bar" :category "???")
           (section
            ()
            (property-drawer
             (:properties (("foo" . "bar"))))
            (paragraph
             ()
             "Foo bar"))))


I've removed irrelevant stuff for the example but you can get get the
start/end point of each element from this structure.
Just call org-element-parse-buffer.

1: http://orgmode.org/w/org-sync.git

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Org Mode TOOD two way sync tool
  2012-06-24 13:15       ` Aurélien Aptel
@ 2012-06-24 13:17         ` Aurélien Aptel
  2012-06-24 17:07         ` Christopher Allan Webber
  1 sibling, 0 replies; 12+ messages in thread
From: Aurélien Aptel @ 2012-06-24 13:17 UTC (permalink / raw)
  To: orgmode; +Cc: emacs-orgmode

On Sun, Jun 24, 2012 at 3:15 PM, Aurélien Aptel
<aurelien.aptel@gmail.com> wrote:
> Just call org-element-parse-buffer.

See also org-element-interpret-data, which lets you write back the structure.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Org Mode TOOD two way sync tool
  2012-06-24 13:15       ` Aurélien Aptel
  2012-06-24 13:17         ` Aurélien Aptel
@ 2012-06-24 17:07         ` Christopher Allan Webber
  2012-06-25 12:32           ` Aurélien Aptel
  2012-06-25 13:51           ` Sriram Karra
  1 sibling, 2 replies; 12+ messages in thread
From: Christopher Allan Webber @ 2012-06-24 17:07 UTC (permalink / raw)
  To: Aurélien Aptel; +Cc: orgmode, emacs-orgmode

Hey Aurélien,

This is great.  I formerly worked on something similar:

http://labs.creativecommons.org/2010/11/10/bridging-public-bugtrackers-and-local-tasklists/

However... my solution was pretty hacky.

I'd be interested to see if you come up with a generic solution that
could have mapppings for multiple bugtrackers, and that could sync with
bugtracking states so if the bug gets closed, the TODO does also, or at
least that it warns as such, etc.

Aurélien Aptel <aurelien.aptel@gmail.com> writes:

> Hi,
>
> I'm working on a bugtracker sync tool for org-mode [1]. I'm using
> org-element to parse org files, it does everything I need.
>
> It turns this
>
>
> * TODO blah <2012-06-25>
> :PROPERTIES:
> :foo: bar
> :END:
> Foo bar
>
> into this:
>
> (org-data nil
>           (headline
>            (:raw-value "blah <2012-06-25>" :title
>                        ("blah "
>                         (timestamp
>                          (:type active :value "<2012-06-25>")))
>                        :level 1
>                        :todo-keyword "TODO"
>                        :todo-type todo
>                        :timestamp "2012-06-25"
>                        :foo "bar" :category "???")
>            (section
>             ()
>             (property-drawer
>              (:properties (("foo" . "bar"))))
>             (paragraph
>              ()
>              "Foo bar"))))
>
>
> I've removed irrelevant stuff for the example but you can get get the
> start/end point of each element from this structure.
> Just call org-element-parse-buffer.
>
> 1: http://orgmode.org/w/org-sync.git

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Org Mode TOOD two way sync tool
  2012-06-24 17:07         ` Christopher Allan Webber
@ 2012-06-25 12:32           ` Aurélien Aptel
  2012-06-25 13:51           ` Sriram Karra
  1 sibling, 0 replies; 12+ messages in thread
From: Aurélien Aptel @ 2012-06-25 12:32 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: orgmode, emacs-orgmode

On Sun, Jun 24, 2012 at 7:07 PM, Christopher Allan Webber
<cwebber@dustycloud.org> wrote:
> http://labs.creativecommons.org/2010/11/10/bridging-public-bugtrackers-and-local-tasklists/

Yes I've already read your post while researching for my project :)

> I'd be interested to see if you come up with a generic solution that
> could have mapppings for multiple bugtrackers, and that could sync with
> bugtracking states so if the bug gets closed, the TODO does also, or at
> least that it warns as such, etc.

You'll be pleased to know that org-sync already does 2-way sync and
works with Github and bitbucket atm. There is a generic
library/multiple backend system in place.

You might be interested in my project page on worg [1] or this
announcement I made some time ago (which has a small tutorial) [2].

1: http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/org-sync/backends.html
2: http://lists.gnu.org/archive/html/emacs-orgmode/2012-06/msg00169.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Org Mode TOOD two way sync tool
  2012-06-24 17:07         ` Christopher Allan Webber
  2012-06-25 12:32           ` Aurélien Aptel
@ 2012-06-25 13:51           ` Sriram Karra
  2012-06-25 14:41             ` Christopher Allan Webber
  1 sibling, 1 reply; 12+ messages in thread
From: Sriram Karra @ 2012-06-25 13:51 UTC (permalink / raw)
  To: Christopher Allan Webber, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 394 bytes --]

On Sun, Jun 24, 2012 at 10:37 PM, Christopher Allan Webber <
cwebber@dustycloud.org> wrote:

> Hey Aurélien,
>
> This is great.  I formerly worked on something similar:
>
>
> http://labs.creativecommons.org/2010/11/10/bridging-public-bugtrackers-and-local-tasklists/


 Nice color-theme, there. If you use color-theme.el, can you share it?
Otherwise, what's your config?

-Karra

[-- Attachment #2: Type: text/html, Size: 803 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Org Mode TOOD two way sync tool
  2012-06-25 13:51           ` Sriram Karra
@ 2012-06-25 14:41             ` Christopher Allan Webber
  2012-06-25 15:29               ` Christopher Allan Webber
  0 siblings, 1 reply; 12+ messages in thread
From: Christopher Allan Webber @ 2012-06-25 14:41 UTC (permalink / raw)
  To: Sriram Karra; +Cc: emacs-orgmode

Sriram Karra <karra.etc@gmail.com> writes:

> On Sun, Jun 24, 2012 at 10:37 PM, Christopher Allan Webber <cwebber@dustycloud.org> wrote:
>
>     Hey Aurélien,
>    
>     This is great.  I formerly worked on something similar:
>    
>     http://labs.creativecommons.org/2010/11/10/bridging-public-bugtrackers-and-local-tasklists/
>
>  Nice color-theme, there. If you use color-theme.el, can you share it?
> Otherwise, what's your config?
>
> -Karra

Ah, I've stopped using that theme!  But it was a small extension to
color-theme-snow.  Here it is. :)

#+begin_src emacs-lisp
;; This software is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

(defun color-theme-snow-better ()
  "Because `color-theme-snow' is so awesome, except for when it isn't."
  (interactive)
  (color-theme-snow)
  (let ((color-theme-is-cumulative t))
    (color-theme-install
     '(color-theme-snow-better
       ((background-color . "snow2")
        (background-mode . light)
        (border-color . "black")
        (cursor-color . "cadet blue")
        (foreground-color . "black")
        (mouse-color . "black"))
       (emacs-wiki-link-face ((t (:bold t :underline "BlueViolet" :foreground "BlueViolet"))))
       (muse-link-face ((t (:bold t :underline "BlueViolet" :foreground "BlueViolet"))))
       (info-xref ((t (:bold t :foreground "BlueViolet"))))
       (region ((t (:background "light steel blue"))))
       (cursor ((t (:background "cadet blue"))))
       (fringe ((t (:background "white"))))
       (planner-high-priority-task-face ((t (:foreground "red"))))
       (planner-medium-priority-task-face ((t (:foreground "green"))))
       (planner-low-priority-task-face ((t (:foreground "blue"))))
       (planner-canceled-task-face ((t (:foreground "gray" :strike-through t))))
       (org-todo ((t (:foreground "red2" :bold t))))
       (org-done ((t (:foreground "SpringGreen3" :bold t))))
       (org-special-keyword ((t (:foreground "sienna"))))
       (org-column ((t (:background "gray85"))))
       (erc-input-face ((t (:foreground "brown"))))
       (erc-notice-face ((t (:foreground "SlateBlue" :bold t))))
       (erc-current-nick-face ((t (:foreground "DarkTurquoise" :bold t))))
       (erc-prompt-face ((t (:foreground "Black" :bold t :background "lightBlue2"))))
       (planner-note-headline-face ((t (:bold t :foreground "azure3"))))))))
#+end_src

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Org Mode TOOD two way sync tool
  2012-06-25 14:41             ` Christopher Allan Webber
@ 2012-06-25 15:29               ` Christopher Allan Webber
  0 siblings, 0 replies; 12+ messages in thread
From: Christopher Allan Webber @ 2012-06-25 15:29 UTC (permalink / raw)
  To: Sriram Karra; +Cc: emacs-orgmode

Christopher Allan Webber <cwebber@dustycloud.org> writes:

> Ah, I've stopped using that theme!  But it was a small extension to
> color-theme-snow.  Here it is. :)

FYI, the theme I use now is naquadah-theme, which I *highly* recommend.

http://git.naquadah.org/?p=naquadah-theme.git;a=summary

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Org Mode TOOD two way sync tool
  2012-06-22  6:40 Org Mode TOOD two way sync tool Sriram Karra
  2012-06-22 12:03 ` Christopher J. White
@ 2012-10-07 19:48 ` Jonathan BISSON
  1 sibling, 0 replies; 12+ messages in thread
From: Jonathan BISSON @ 2012-10-07 19:48 UTC (permalink / raw)
  To: emacs-orgmode

Sriram Karra <karra.etc <at> gmail.com> writes:

> 
> 
> I am the author of ASynK (http://karra-asynk.appspot.com), a PIM sync tool and
framework written in python that works across a variety of PIM providers such as
Outlook, Google and BBDB. I am considering extending ASynK to do a
bi-directional sync of Outlook tasks to Org Mode tasks. To be able to do this I
need a working read/write API for reading and creating TODOs in org mode.
> 
> 
> 
> "Offline parsers"
> 
> My first preference is to be able to parser org files without required Emacs -
this is the approach that I have implemented for BBDB sync. I considered
PyOrgMode (https://github.com/bjonnh/PyOrgMode/network), but it appears unable
to process TODOs, or even recurring events. To be able to extend PyOrgMode so I
can read and write TODOs, I needed a full description of the format of TODO
entries in all its forms. The Org manual itself has this information, I'm sure
but scattered all over the place, given its real audience. Can someone point me
to some sort of a concise representation, if any, of the org file format grammar?
> 
Hi, 

I'm the maintener and creator of PyOrgMode, some contributors (that I can't
thanks enough there), added many TODO related enhancements to it. If you want to
give it a try, we may be able to work together in getting your needs included in
PyOrgMode.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-10-07 19:49 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-22  6:40 Org Mode TOOD two way sync tool Sriram Karra
2012-06-22 12:03 ` Christopher J. White
2012-06-22 12:33   ` Sriram Karra
2012-06-22 14:05     ` Christopher J. White
2012-06-24 13:15       ` Aurélien Aptel
2012-06-24 13:17         ` Aurélien Aptel
2012-06-24 17:07         ` Christopher Allan Webber
2012-06-25 12:32           ` Aurélien Aptel
2012-06-25 13:51           ` Sriram Karra
2012-06-25 14:41             ` Christopher Allan Webber
2012-06-25 15:29               ` Christopher Allan Webber
2012-10-07 19:48 ` Jonathan BISSON

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).