orgmode-parse-0.0.2.0: 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.Attoparsec.Headings

Description

Parsing combinators for org-list headings.

Synopsis

Documentation

data Priority Source

Constructors

A 
B 
C 
Unknown 

newtype State Source

Constructors

State Text.Text 

Instances

newtype Keyword Source

Constructors

Keyword Text.Text 

newtype PropertyDrawer k v Source

Constructors

PropertyDrawer (HashMap k v) 

Instances

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

data Timestamp Source

Constructors

Active LocalTime 
Inactive LocalTime 

newtype Open Source

Constructors

Open Char 

newtype Close Source

Constructors

Close Char 

heading :: TP.Parser Text.Text Heading Source

Parse an org-mode heading.

headingLevel :: TP.Parser Text.Text Int Source

Parse the asterisk indicated heading level until a space is reached.

headingPriority :: TP.Parser Text.Text (Maybe Priority) Source

Parse the priority indicator.

If anything but these priority indicators are used the parser will fail: `[B]`, `[#C]`.

headingTitle :: TP.Parser Text.Text (Text.Text, Maybe Keyword) Source

Title parser with alternative.

This function tries to parse a title with a keyword and if it fails it then attempts to parse everything till the end of the line.

headingKeyword :: TP.Parser Text.Text (Maybe Keyword) Source

Parse a heading keyword.

You can use this with many' and catMaybes to get a list keywords:

keys <- many' headingKeyword
return $ catMaybes keys