Go to file
Oly 9b61640ba5
continuous-integration/drone/push Build is failing Details
Handle blank douments html generation and wrap reponse in div.
2018-12-13 08:49:29 +00:00
eorg Handle blank douments html generation and wrap reponse in div. 2018-12-13 08:49:29 +00:00
examples Refactored to use ints as token ids in place of strings 2018-11-03 14:10:37 +00:00
tests Add test for export settings attributes 2018-12-10 14:21:21 +00:00
.drone.yml Working on source block tests. 2018-12-06 07:22:32 +00:00
.gitignore Initial commit 2018-10-14 20:42:46 +01:00
.gitlab-ci.yml Updated ci build configs 2018-11-30 07:28:19 +00: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.cfg Lower case attribute tokens, immprove testing framework 2018-11-29 13:47:29 +00:00
setup.py Lower case attribute tokens, immprove testing framework 2018-11-29 13:47:29 +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)