Go to file
Oly 700d01923c Improved image handling now captures CAPTIONS with test 2018-11-28 08:50:32 +00:00
eorg Improved image handling now captures CAPTIONS with test 2018-11-28 08:50:32 +00:00
examples Refactored to use ints as token ids in place of strings 2018-11-03 14:10:37 +00:00
tests Improved image handling now captures CAPTIONS with test 2018-11-28 08:50:32 +00:00
.gitignore Initial commit 2018-10-14 20:42:46 +01:00
.gitlab-ci.yml Initial commit 2018-10-14 20:42:46 +01:00
LICENSE Initial commit 2018-10-14 20:42:46 +01:00
readme.org Refactored to use ints as token ids in place of strings 2018-11-03 14:10:37 +00:00
requirements.txt Add pygmentise to equirements 2018-11-01 21:45:15 +00:00
setup.py Add pygmentise to equirements 2018-11-01 21:45:15 +00:00

readme.org

Eorg

Simple parser for org documents similar to markdown but far more powerful. The current parser was a bit limited so this is an attempt to make something simpler to use and extend.

This is not currently meant for generating org files only for reading data from them for scripts.

Install

pip install eorg

Developing

python setup.py develop

Examples

Generating plain html

Simple raw html generation

  import os
  from eorg.parser import parse
  from eorg.generate import html

  with open(os.path.abspath('../../tests/fixtures/test.org'), 'r') as fp:
      doc = parse(fp)
      print(html(doc).read())

Simple raw html generation

  import os
  from eorg.parser import parse
  from eorg.generate import html

  with open(os.path.abspath('../../tests/fixtures/test.org'), 'r') as fp:
      doc = parse(fp)
      for row in doc.filter('src'):
          print(row.token)