Orgparse Examples
These files are adapted from the orgparse Python library test suite. Each example demonstrates a distinct aspect of org-mode document structure.
Examples
00 Simple — Hierarchical Document Structure with Tasks and Tags
Basic heading hierarchy across five levels with custom TODO states
(TODO1 through TODO4) and tag inheritance. Demonstrates how
orgparse traverses nested headings and collects tags at each level.
01 Attributes — Node Attributes and Date Ranges
A node carrying the full set of org scheduling metadata: SCHEDULED,
DEADLINE, CLOSED, CLOCK entries, an :Effort: property, and
inline date lists including time ranges. Shows how orgparse exposes
each attribute via its API.
02 Tree Structure — Hierarchical Structure Analysis
Headings with intentionally irregular depth jumps (e.g., a level-4 heading immediately under a level-1 heading). Tests that orgparse correctly assigns parent/child relationships regardless of skipped levels.
03 Repeated Tasks — Task Tracking with State Changes and Deadlines
A single recurring TODO with a monthly +1m deadline repeater and
three past state-change log entries. Illustrates how orgparse surfaces
state-transition history and repeating timestamps.
04 Logbook — Logbook Drawer Test
A node whose time-tracking data lives inside a :LOGBOOK: drawer
rather than inline. Verifies that orgparse reads drawer-enclosed
CLOCK entries correctly.
05 Tags — Exploring Textual Representations
Nine headings exercising tag edge cases: plain tags, tags beginning
with @, multi-tag strings, single-character tags (:_:, :@:),
underscored tags, headings that contain colons in the title, and
Unicode tag names (Cyrillic, accented Latin).
Source
These examples originate from the orgparse test suite at
orgparse/tests/data/. The library is available on PyPI:
pip install orgparse
Repository: github.com/karlicoss/orgparse
