orgmode-parse-0.0.2.1: A parser and writer for org-mode flavored documents.

Copyright© 2014 Parnell Springmeyer
LicenseAll Rights Reserved
MaintainerParnell Springmeyer <parnell@digitalmentat.com>
Stabilitystable
Safe HaskellNone
LanguageHaskell2010

Data.OrgMode.Parse.Types

Contents

Description

Types and utility functions for representing parsed org-mode documents.

Synopsis

Heading

data Heading Source

An OrgMode heading.

Constructors

Heading 

Instances

data Priority Source

The priority of a heading item.

A, B, and C correspond to the `[B]`, and `[#C]` syntax in OrgMode document headings.

Constructors

A 
B 
C 
Unknown 

toPriority :: Text -> Priority Source

Convert text into a Priority value.

newtype State Source

The state of a heading (TODO, DONE, EVENT, etc...)

Constructors

State Text 

Instances

newtype Keyword Source

A keyword in a heading *not part of the property drawer*!

Constructors

Keyword Text 

PropertyDrawer

newtype PropertyDrawer k v Source

The property drawer as an unordered HashMap.

Constructors

PropertyDrawer (HashMap k v) 

Instances

(Eq k, Eq v) => Eq (PropertyDrawer k v) 
(Show k, Show v) => Show (PropertyDrawer k v) 

Schedule & Timestamp

data Schedule Source

The "schedule" line. In OrgMode it must precede the heading immediately and can contain a SCHEDULED, DEADLINE, or none. No marker assumes the lonely timestamp is therefore an *appointment*.

  • SCHEDULED* is the date & time you are going to start on something and the appointment is the date and time something occurs.

Recurring time intervals are also possible and are not parsed right now but are kept in the recurring field.

Instances

data ScheduleType Source

The schedule value, no value (or a failed parse) will result in simply the APPOINTMENT value.

data Timestamp Source

An active or inactive timestamp as LocalTime.

Constructors

Active LocalTime 
Inactive LocalTime 

newtype Open Source

So we don't get confused when passing the opening and closing characters to the timestamp parser.

Constructors

Open Char 

newtype Close Source

Constructors

Close Char