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

Description

Parsing combinators for org-list headings.

Synopsis

Documentation

data Heading Source

Constructors

Heading 

Instances

data Priority Source

Constructors

A 
B 
C 
Unknown 

newtype State Source

Constructors

State Text 

Instances

newtype Keyword Source

Constructors

Keyword Text 

heading :: Parser Text Heading Source

Parse an org-mode heading.

headingLevel :: Parser Text Int Source

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

headingPriority :: Parser Text (Maybe Priority) Source

Parse the priority indicator.

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

headingTitle :: Parser 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 :: Parser 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