orgmode-parse
provides a top-level parser and collection of attoparsec parser
combinators for org-mode structured text.
You can find the package on Hackage.
We have built attoparsec parsers for parsing org-mode document structures and meta-data. Here is a list of all the syntax features that have a complete parsing implementation and not:
- Headlines and Sections
- Affiliated Keywords
- [-] Greater Elements
- Greater Blocks
- Drawers
- Dynamic Blocks
- Footnote Definitions
- Inlinetasks
- Plain Lists and Items
- Unordered lists
- Numbered lists
- Checkbox modified lists
- Property Drawers
- Tables
- Elements
- Babel Cell
- Blocks
- Clock, Diary Sexp and Planning
- Scheduled and deadline timestamps (timestamp, range, duration, periodicity)
- Active and inactive timestamps
- Clock timestamps
- Scheduled and deadline timestamps (timestamp, range, duration, periodicity)
- Comments
- Fixed Width Areas
- Horizontal Rules
- Keywords
- LaTeX Environments
- Node Properties
- Paragraphs
- Table Rows
- Objects
- [-] Entities and LaTeX Fragments
- Export Snippets
- Footnote References
- Inline Babel Calls and Source Blocks
- Line Breaks (\)
- Links
- Macros
- Targets and Radio Targets
- Statistics Cookies
- Table Cells
- [-] Timestamps
- Text Markup
- Bold
- Italic
- Strikethrough
- Underline
- Superscript
- Subscript
- Code / monospaced
- Position Annotated AST
There are a few ways to build this library if you're developing a patch:
stack build && stack test
, andnix-build --no-out-link --attr orgmode-parse release.nix
You can also use the nix-shell
provided cabal environment for incremental
development:
$ nix-shell
$ cabal build