Copyright | © 2014 Parnell Springmeyer |
---|---|
License | All Rights Reserved |
Maintainer | Parnell Springmeyer <parnell@digitalmentat.com> |
Stability | stable |
Safe Haskell | None |
Language | Haskell2010 |
Parsing combinators for org-list headings.
Documentation
headingBelowLevel :: [Text.Text] -> LevelDepth -> Parser Text.Text Heading Source
Parse an org-mode heading and its contained entities
(see orgmode.orgworgdev/org-syntax.html Header guidance)
Headers include a hierarchy level indicated by *
s,
optional Todo-like state, priority level, %-done stats, and tags
e.g.: ** TODO [#B] Polish Poetry Essay [25%] :HOMEWORK:POLISH:WRITING:
Headings contain:
* A section
with Planning and Clock entries
* A number of other not-yet-implemented entities (code blocks, lists)
* Unstructured text
* Other heading deeper in the hierarchy
headingBelowLevel takes a list of terms to consider StateKeyword's, and a minumum hierarchy depth. Use 0 to parse any heading
headingLevel :: LevelDepth -> Parser Text.Text Level Source
Parse the asterisk indicated heading level until a space is reached.
Constrain to LevelDepth or its children
parseStats :: Parser Text.Text Stats Source
Parse a Stats block.
Accepts either form: "[m/n]" or "[n%]" There is no restriction on m or n other than that they are integers