| Copyright | © 2014 Parnell Springmeyer |
|---|---|
| License | All Rights Reserved |
| Maintainer | Parnell Springmeyer <parnell@digitalmentat.com> |
| Stability | stable |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.OrgMode.Parse.Attoparsec.Headings
Description
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 OrgSyntax).
Headers include a hierarchy level indicated by asterisks, optional todo states, priority level, %-done stats, and tags.
** TODO [#B] Polish Poetry Essay [25%] :HOMEWORK:POLISH:WRITING:
Headings may 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, state
keywords, 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 it to LevelDepth or its children.
headingPriority :: Parser Text.Text Priority Source
Parse the priority indicator.
If anything but these priority indicators are used the parser will fail:
[#A]
[#B]
[#C]
parseStats :: Parser Text.Text Stats Source
Parse a stats block.
Accepts either form: "[m/n]" or "[n%]" and there is no restriction on m or n other than that they are integers.