Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A fork of Takafumi Araraki's fork of Charles Cave's Python library for parsing org-mode files
Python
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
LICENSE
Orgnode.py
README.org

README.org

Orgnode

»Orgnode - reading org-mode in Python« was originally developed by Charles Cave. This is a fork by Takafumi Arakaki, with some minor fixes by Albin Stjerna.

How to use

Just set the Orgnode.py where your python can import this module.

Some samples (directly from Cave’s version):

import Orgnode, datetime

today = datetime.date.today()
print "Daily plan for", today
print "-------------------------\n"

filename = "c:/charles/GTD/newgtd.org"
nodelist = Orgnode.makelist(filename)

for n in nodelist:
    if n.Scheduled() == today:
         print "[ ] %s (%s)" % (n.Heading(), n.Tag() )

Tests

Orgnode uses nose for unit tests, thanks to Arakaki. To run them, just execute nosetests in the Orgnode directory. You do need to symlink in orgnode.py into the tests directory for it to work, though.

Differences to Arakaki’s and Cave’s versions

So far, the only thing I’ve really done is adding a few test cases and fixing a bug in one of the regular expressions that would produce incorrect results when a TODO keyword appeared inside a paragraph. I do, however, intend to use orgnode, and improve on it when I find bugs.

As far as I can tell, Arakaki’s verison is a significant improvement over Cave’s, fixing proper unicode handling among other things.

Something went wrong with that request. Please try again.