I’ve gone heavily into Julia over the past year, and I recently thought it would be nice if an Org parser existed for it — so I made one!
It’s just over a week since I started, so it’s fairly young, but I’m pretty happy with the way it’s shaping up 🙂. To give you an idea, here’s some example usage from the readme:
text1 = org"Some *Org* markup, written with easy using the ~org\"\"~ macro." parsetree(text1) # show the generated parse tree text2 = parse(Org, "Some *Org* markup, written with easy using the ~parse~ function.") diff(text1, text2) # show the components of the parse trees that differ dochead = @doc OrgMode.Heading # the documentation for the Heading component (::Org) org(dochead) # generate Org text that produces the OrgMode.Heading object string(dochead) # as above, but produces a String parse(Org, string(dochead)) == dochead # round-trip equality filtermap(dochead, [OrgMode.SourceBlock], s -> s.lang) # get the lang of each source block
There’s also a bit of an ulterior motive here, I’ve been rather interested in the Org syntax and how easy it is to write tools for it outside of Emacs, and I’ve been thinking that writing a parser would be a great way to find out and allow me to make some more informed comments on https://orgmode.org/worg/dev/org-syntax.html, hopefully pushing it just a bit closer to having “(draft)” lopped off the title 😛.
You can expect to see another email from me with some comments the Org Syntax document shortly.
All the best,