org-python

convert orgmode to html based on python.

BSD-3-CLAUSE License

Downloads
378
Stars
17
Committers
1
  • org-python An orgmode parser for converting orgmode to html based on python.

    [[https://pypi.python.org/pypi/org-python][https://img.shields.io/badge/pypi-v0.3.2-brightgreen.svg]] [[https://python.org][https://img.shields.io/badge/python-3-brightgreen.svg]] [[LICENSE][https://img.shields.io/badge/license-BSD-blue.svg]]

** quickstart #+BEGIN_SRC sh pip install org-python #+END_SRC

#+BEGIN_SRC python from orgpython import to_html

 text = '''* heading
 - list1
 - list2
 - list3
   - list4
 - list5

   | th1-1  | th1-2  | th1-3  |
   |--------+--------+--------|
   | row1-1 | row1-2 | row1-3 |
   | row2-1 | row2-2 | row2-3 |
   | row3-1 | row3-2 | row3-3 |
 '''
 print(to_html(text, toc=True, offset=0, highlight=True))

#+END_SRC

** feature

  • toc
  • heading
    #+BEGIN_EXAMPLE
    • headind 1
      ** headind 2
      *** headind 3
      **** headind 4
      ***** headind 5
      ****** headind 6
      #+END_EXAMPLE
  • unordered_list
    #+BEGIN_EXAMPLE
    • list
    • list
      • list
        • list
      • list
        #+END_EXAMPLE
  • ordered_list
    #+BEGIN_EXAMPLE
    1. list
    2. list
    3. list
      #+END_EXAMPLE
  • bold
    #+BEGIN_EXAMPLE
    bold
    #+END_EXAMPLE
  • italic
    #+BEGIN_EXAMPLE
    italic
    #+END_EXAMPLE
  • underlined
    #+BEGIN_EXAMPLE
    italic
    #+END_EXAMPLE
  • code
    #+BEGIN_EXAMPLE
    =code=
    #+END_EXAMPLE
  • delete
    #+BEGIN_EXAMPLE
    +delete+
    #+END_EXAMPLE
  • image
    #+BEGIN_EXAMPLE
    [[src][alt]]
    #+END_EXAMPLE
  • link
    #+BEGIN_EXAMPLE
    [[href][text]]
    #+END_EXAMPLE
  • begin_example
  • begin_src
  • begin_quote
  • table
    #+BEGIN_EXAMPLE
    | th1-1 | th1-2 | th1-3 |
    |--------+--------+--------|
    | row1-1 | row1-2 | row1-3 |
    | row2-1 | row2-2 | row2-3 |
    | row3-1 | row3-2 | row3-3 |
    #+END_EXAMPLE