MyNixOS website logo
Description

A collection of Attoparsec combinators for parsing org-mode flavored documents.

`orgmode-parse` is a parsing library for the org-mode flavor of document markup.

The provided Attoparsec combinators parse the human-readable and textual representation into a simple AST for storage or output to another format (HTML? Markdown?).

Welcome!

Hackage Version Travis CI Status

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.

What's Finished

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:

  • [X] Headlines
    • [X] State keywords
    • [X] Priority indicator
    • [X] Title
    • [X] Status / progress indicator
    • [X] Tag list
  • [X] Property drawers
  • [X] State keyword changelogs
  • [X] Scheduled and deadline timestamps (timestamp, range, duration, periodicity)
    • [X] Active and inactive timestamps
  • [X] Clock timestamps
  • [ ] Markup
    • [ ] Emphasis
      • [ ] Bold
      • [ ] Italic
      • [ ] Strikethrough
      • [ ] Underline
      • [ ] Superscript
      • [ ] Subscript
      • [ ] Code / monospaced
    • [ ] Tables
    • [ ] Lists
      • [ ] Unordered lists
      • [ ] Numbered lists
      • [ ] Checkbox modified lists
    • [ ] Blocks (src / quote / example blocks)

Parsing org-mode markup is currently being worked on.

What's Planned (outside of what's not finished)

  1. Modernizing this library and adding significantly more documentation to it
  2. Writing a sister library, orgmode-pretty, providing a pretty printer implementation for an org-mode AST
  3. Pandoc integration

Building

There are a few ways to build this library if you're developing a patch:

  • stack build && stack test, and
  • nix-build --no-out-link --attr orgmode-parse release.nix

You can also use the nix-shell provided cabal environment for incremental development:

$ nix-shell --attr orgmode-parse.env release.nix
$ cabal build

Projects that use this package:

https://github.com/volhovm/orgstat

License

BSD3 Open Source Software License.

Metadata

Version

0.2.3

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows