All Projects β†’ karlicoss β†’ Orgparse

karlicoss / Orgparse

Licence: bsd-2-clause
Python module for reading Emacs org-mode files

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Orgparse

Eless
A Better 'less' - A bash script that loads emacs with minimal view-mode config - Created with Org mode
Stars: ✭ 94 (-39.74%)
Mutual labels:  org-mode
Kulfon
πŸ‘Ή 🐸 JavaScript static site generator with Org Mode & Markdown support (Ξ±) πŸ’₯
Stars: ✭ 112 (-28.21%)
Mutual labels:  org-mode
Swift Org
org-mode with swift
Stars: ✭ 146 (-6.41%)
Mutual labels:  org-mode
Ox Rst
reStructuredText Back-End for Org-Mode Export Engine
Stars: ✭ 94 (-39.74%)
Mutual labels:  org-mode
Org2opml
Converts Emacs Org-mode files to OPML format used by Mindnode and Freemind
Stars: ✭ 108 (-30.77%)
Mutual labels:  org-mode
Walkman
Write HTTP requests in Org mode and replay them at will using cURL
Stars: ✭ 120 (-23.08%)
Mutual labels:  org-mode
Fundamental Haskell
Fundamental Haskell book, to the point terse statements on Haskell, Category theory, and related fields. Encyclopedic pocketbook of meaning. Zen kōan-like meditations of understanding. For quick or memory curve spaced repetition learning.
Stars: ✭ 88 (-43.59%)
Mutual labels:  org-mode
Orgzly Android
Outliner for taking notes and managing to-do lists
Stars: ✭ 2,042 (+1208.97%)
Mutual labels:  org-mode
Emacs Gtd
Get Things Done with Emacs
Stars: ✭ 111 (-28.85%)
Mutual labels:  org-mode
Org Graph View
View Org buffers as a clickable, graphical mind-map
Stars: ✭ 141 (-9.62%)
Mutual labels:  org-mode
Jekyll Org
org-mode converter for Jekyll.
Stars: ✭ 97 (-37.82%)
Mutual labels:  org-mode
Org Brain
Org-mode wiki + concept-mapping
Stars: ✭ 1,512 (+869.23%)
Mutual labels:  org-mode
Novels.org
Novels.org - Your Novels in Plain Text (Emacs . org-mode)
Stars: ✭ 120 (-23.08%)
Mutual labels:  org-mode
Organice
An implementation of Org mode without the dependency of Emacs - built for mobile and desktop browsers
Stars: ✭ 1,327 (+750.64%)
Mutual labels:  org-mode
Org Fragtog
Automatically toggle Org mode LaTeX fragment previews as the cursor enters and exits them
Stars: ✭ 149 (-4.49%)
Mutual labels:  org-mode
Ox Jira.el
Org-mode export backend for JIRA markup
Stars: ✭ 88 (-43.59%)
Mutual labels:  org-mode
Cheatsheet
Pretty cheat sheets, or ``reference cards'', obtainable from Org files.
Stars: ✭ 116 (-25.64%)
Mutual labels:  org-mode
Org Msg
OrgMsg is a GNU/Emacs global minor mode mixing up Org mode and Message mode to compose and reply to emails in a Outlook HTML friendly style.
Stars: ✭ 153 (-1.92%)
Mutual labels:  org-mode
Writingwithemacs
Tips, Examples, and Resources for Writing with Emacs
Stars: ✭ 150 (-3.85%)
Mutual labels:  org-mode
Org Java
Org mode files Java parser
Stars: ✭ 138 (-11.54%)
Mutual labels:  org-mode

=========================================================== orgparse - Python module for reading Emacs org-mode files

  • Documentation (Read the Docs) <https://orgparse.readthedocs.org>_
  • Repository (at GitHub) <https://github.com/karlicoss/orgparse>_
  • PyPI <https://pypi.python.org/pypi/orgparse>_

Install

pip install orgparse

Usage

There are pretty extensive doctests if you're interested in some specific method. Otherwise here are some example snippets:

Load org node ^^^^^^^^^^^^^ ::

from orgparse import load, loads

load('PATH/TO/FILE.org')
load(file_like_object)

loads('''
* This is org-mode contents
  You can load org object from string.
** Second header
''')

Traverse org tree ^^^^^^^^^^^^^^^^^

root = loads(''' ... * Heading 1 ... ** Heading 2 ... *** Heading 3 ... ''') for node in root[1:]: # [1:] for skipping root itself ... print(node)

  • Heading 1 ** Heading 2 *** Heading 3

h1 = root.children[0] h2 = h1.children[0] h3 = h2.children[0] print(h1)

  • Heading 1

print(h2) ** Heading 2 print(h3) *** Heading 3 print(h2.get_parent())

  • Heading 1

print(h3.get_parent(max_level=1))

  • Heading 1

Accessing node attributes ^^^^^^^^^^^^^^^^^^^^^^^^^

root = loads(''' ... * DONE Heading :TAG: ... CLOSED: [2012-02-26 Sun 21:15] SCHEDULED: <2012-02-26 Sun> ... CLOCK: [2012-02-26 Sun 21:10]--[2012-02-26 Sun 21:15] => 0:05 ... :PROPERTIES: ... :Effort: 1:00 ... :OtherProperty: some text ... :END: ... Body texts... ... ''') node = root.children[0] node.heading 'Heading' node.scheduled OrgDateScheduled((2012, 2, 26)) node.closed OrgDateClosed((2012, 2, 26, 21, 15, 0)) node.clock [OrgDateClock((2012, 2, 26, 21, 10, 0), (2012, 2, 26, 21, 15, 0))] bool(node.deadline) # it is not specified False node.tags == set(['TAG']) True node.get_property('Effort') 60 node.get_property('UndefinedProperty') # returns None node.get_property('OtherProperty') 'some text' node.body ' Body texts...'

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].