that sounds like an interesting approach. xml seems like what you really
want, since looking at the parsetree there is a lot of information (e.g.
attributes, properties, etc...) that would be tricky to generate a fully
representative json scheme.

This page suggests at the bottom you could export to texinfo, and convert
that to docbook:
http://orgmode.org/worg/exporters/ox-overview.html


   - (1) DocBook export, available in previous Org-mode versions, has not
   currently been ported to the new exporter, however the new
ox-texinfobackend can generate DocBook format. Once
   file.texi is created via ox-texinfo, simply execute:

makeinfo --docbook file.texi




John

-----------------------------------
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



On Thu, Dec 5, 2013 at 3:30 PM, Brett Viren <b...@bnl.gov> wrote:

> Has anyone written any new-style exporter which will produce a common
> markup/data language format like JSON or YAML?  I'm looking for
> something that fully preserves the original org document structure and
> does no semantic interpretation along the way.
>
> What I really want is to parse arbitrary org files in Python.  I've
> looked at the entries at worg's "org-tool" node which do this but they
> seem out of date or make assumptions about what org elements exist or
> their URLs are not loading (NEO).  If any of that's a misrepresentation
> please correct me.
>
> In any case, using org's own exporter to produce JSON or YAML and then
> relying on these format's Python modules for parsing seems like the best
> way to go to let me author in org and process in Python.
>
> I'm not very good with elisp (which is why I want to get org data into
> Python) but I guess I can have a go at making such a "shunt" exporter.
> Before I try, I just wanted to check if someone had this wheel already
> spinning.
>
> Thanks,
> -Brett.
>

Reply via email to