CLOSED: [2015-05-15 Fri 17:35] :PROPERTIES: :CREATED: [2015-05-15 Fri 17:14] :ID: 2015-05-15-pypandoc-for-lazyblorg :END: :LOGBOOK: - State "DONE" from "NEXT" [2015-05-15 Fri 17:35] :END: [[https://github.com/novoid/lazyblorg/issues/2][Arne did post a great comment]] about the issue of only supporting a sub-set of Org-mode syntax within lazyblorg. Although I explained my reasons to write my own Org-mode parser, he made me think. I already knew [[http://pandoc.org/][pandoc]] which is a universal document converter. However, I was not aware that I could use pandoc within Python via [[https://github.com/bebraw/pypandoc][pypandoc]]. ----------- A short test did light up my mind: ~import pypandoc; pypandoc.convert('- *foo* bar', 'html', format='org')~ resulted in ~u'\n'~. Well, this is a game changer. Not only I could have made my Org-mode parser and HTML-izer much simpler in the first place. I now can easily add Org-mode elements which are not yet supported by my own parser. As a first step, I integrated support for tables via pypandoc. So far, I am pleased by the result although I still have to test it in real life. [[id:2015-05-20-lists-in-lazyblorg][Next will be support for lists]]. Further more, I am thinking of using pypandoc as a fall-back converter for all not yet supported Org-mode syntax elements (via my own converter, of course). | Next steps | Time range | Comment | |----------------------------------+---------------+-----------------------------------| | Basic support for tables | done | This is my first [[https://github.com/novoid/lazyblorg][lazyblorg]]-table! | | Basic support for itemized lists | days to weeks | | | Pypandoc as a fall-back | weeks | Let me think about this | Stay tuned, stay curious.