emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] suggestion: "native" orgmode XML export (and import?)


From: Ilya Shlyakhter
Subject: Re: [Orgmode] suggestion: "native" orgmode XML export (and import?)
Date: Fri, 7 Aug 2009 11:46:57 +0200

That's great, thanks!  I should be able to take it from there.
It would be great if at some point this became official, and also
included an XML exporter and specification.

thanks,

ilya

On Fri, Aug 7, 2009 at 11:13 AM, Andrew Stribblehill<address@hidden> wrote:
> [re-adding the mailing list]
>
> No, EXPERIMENTAL/org-export.el. Here's what I did after M-x load-file
> /path/to/org-export.el:
>
> (defun org-export-sexp (arg)
>  (interactive "p")
>  (let ((bufstr (org-export-parse arg)))
>    (save-excursion
>      (switch-to-buffer (get-buffer-create "*Org export*"))
>      (erase-buffer)
>      (insert (format "%s" bufstr)))))
>
> An org file such as:
> ----
> Objectives
>
> * Q3 2009
>    :PROPERTIES:
>    :SCORE:    0.77
>    :END:
> ** Operations
>
> *** [#0] Oncall. Keep the site up
> *** [#1] Keep the tubes clear.
>
> ** Projects
> ----
>
> comes out as:
> ((:level 1
>  :heading Q3 2009
>  :properties ((SCORE . 0.77) (CATEGORY . proj-sanitised))
>  :content :subtree
>  ((:level 2
>    :heading Operations
>    :properties ((CATEGORY . proj-sanitised))
>    :content :subtree
>    ((:level 3
>      :heading Oncall. Keep the site up
>      :properties ((PRIORITY . 0) (CATEGORY . proj-sanitised))
>      :content  :subtree nil)
>     (:level 3
>      :heading Keep the tubes clear.
>      :properties ((PRIORITY . 1) (CATEGORY . proj-sanitised))
>      :content :subtree nil)))
>   (:level 2
>    :heading Projects
>    :properties ((CATEGORY . proj-sanitised))
>    :content :subtree nil))))
>
> 2009/8/7 Ilya Shlyakhter <address@hidden>:
>> Thanks for the pointer.   Did you mean org-exp.el?   How exactly do I
>> get the internal representation?
>> thanks,
>> ilya
>>
>> On Thu, Aug 6, 2009 at 11:58 PM, Andrew Stribblehill<address@hidden> wrote:
>>> I notice the experimental org-export.el contains an internal representation.
>>> It would probably be very easy for your python to parse the lisp
>>> s-expression it uses, if it were exported.
>>>
>>> On Aug 6, 2009 3:55 PM, "Ilya Shlyakhter" <address@hidden> wrote:
>>>
>>> I'm not an emacs-lisp programmer, but I'd like to write scripts
>>> (ideally in Python) to generate custom reports from my .org files.
>>> What would help a lot, is if there was a command to export an .org
>>> file to a "native" XML format that would mirror the org file's
>>> structure and all its logical elements (tags, properties, drawers,
>>> dates etc).   I know about the DocBook exporter, but it maps orgmode's
>>> concepts onto DocBook concepts such as articles.   I'm a longtime
>>> orgmode user and it would be much simpler to write a program in terms
>>> of the familiar org concepts (hierarchical entries, tags, properties
>>> etc).
>>> It would also be great if there was a way to import such an XML file
>>> back into org.  Then one could e.g. take Toodledo.com tasks and
>>> transform them into an orgmode file.
>>>
>>> There is an orgmode Python reader at
>>> http://www.members.optusnet.com.au/~charles57/GTD/orgnode.html
>>> and I plan to use that for now.  But it doesn't support all orgmode
>>> features, and more importantly it does its own parsing of orgfiles (so
>>> may not keep up with any future changes).   Using orgmode's own
>>> parser, and then exporting the results as XML, would be much more
>>> reliable.
>>>
>>> ilya
>>>
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Remember: use `Reply All' to send replies to the list.
>>> address@hidden
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>
>>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]