Mldoc
Another Org-mode and Markdown parser implemented using OCaml and Angstrom. It’s based on mlorg which is a high quality Org-mode parser written by Simon Castellan.
Who’s using Mldoc?
- Logseq, a local-first notes app (In development)
Build
# compile
make
# run test
make test
Run utop
cd lib
dune utop
Usage
For Javascript users
# install mldoc
npm install -g mldoc
# convert org mode file to html
mldoc convert -i ./test.org -o ./test.html
# convert markdown mode file to html
mldoc convert -i ./test.markdown -o ./test.html
For OCaml users
# compile
make
# convert org file to html
_build/default/bin/main.exe ./test.org -o ./test.html
Invoke utop in Emacs
opam config exec -- dune utop lib -- -emacs
Parsing todos [12/12]
Heading [7/7]
- [X] level
- [X] marker
- [X] priority
- [X] title
- [X] tags
- [X] stats
- [X] footnote
Markup (Inline) [14/14]
- [X] Latex fragment
- [X] timestamp
- [X] entity
- [X] macro
- [X] statistics cookie
- [X] footnote reference
- [X] link
- [X] direct link
- [X] target
- [X] verbatim
- [X] code
- [X] nested emphasis [4/4]
- [X] bold
- [X] underline
- [X] italic
- [X] strike_through
- [X] subscript
- [X] superscript
Table [2/2]
- [X] preliminary support
- [X] column groups
List [3/3]
- [X] Unordered list
- [X] Ordered list
- [X] Definition list
Directive
Block [5/5]
- [X] src
- [X] quote
- [X] example
- [X] custom
- [X] block nested in block
Comment
Drawer
Not exported.
Horizontal
Latex environment
Quoting
TOC
Export [2/2]
- [X] json
- [X] html