https://github.com/logseq/mldoc
Another Emacs Org-mode and Markdown parser.
https://github.com/logseq/mldoc
Last synced: 2 months ago
JSON representation
Another Emacs Org-mode and Markdown parser.
- Host: GitHub
- URL: https://github.com/logseq/mldoc
- Owner: logseq
- License: agpl-3.0
- Created: 2018-10-01T13:05:38.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-08-03T07:16:35.000Z (over 1 year ago)
- Last Synced: 2025-10-01T04:59:06.051Z (3 months ago)
- Language: OCaml
- Homepage:
- Size: 2.25 MB
- Stars: 258
- Watchers: 12
- Forks: 29
- Open Issues: 20
-
Metadata Files:
- Readme: readme.org
- License: LICENSE
Awesome Lists containing this project
README
* Mldoc
Another Org-mode and Markdown parser implemented using OCaml and [[https://github.com/inhabitedtype/angstrom][Angstrom]].
It's based on [[http://iso.mor.phis.me/projects/mlorg/][mlorg]] which is a high quality Org-mode parser written by [[https://github.com/asmanur?tab=repositories][Simon Castellan]].
** Who's using Mldoc?
- [[https://logseq.com][Logseq]], a local-first notes app (In development)
** Build
#+begin_src sh
# compile
make
# run test
make test
#+end_src
** Run utop
#+begin_src sh
cd lib
dune utop
#+end_src
** Usage
*** For Javascript users
#+BEGIN_SRC sh
# 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
#+END_SRC
*** For OCaml users
#+BEGIN_SRC sh
# compile
make
# convert org file to html
_build/default/bin/main.exe ./test.org -o ./test.html
#+END_SRC
*** Invoke utop in Emacs
#+BEGIN_SRC sh
opam config exec -- dune utop lib -- -emacs
#+END_SRC
** Parsing todos [12/12]
*** DONE Heading [7/7]
1. [X] level
2. [X] marker
3. [X] priority
4. [X] title
5. [X] tags
6. [X] stats
7. [X] footnote
*** DONE Markup (Inline) [14/14]
1. [X] Latex fragment
2. [X] timestamp
3. [X] entity
4. [X] macro
5. [X] statistics cookie
6. [X] footnote reference
7. [X] link
8. [X] direct link
9. [X] target
10. [X] verbatim
11. [X] code
12. [X] nested emphasis [4/4]
1. [X] bold
2. [X] underline
3. [X] italic
4. [X] strike_through
13. [X] subscript
14. [X] superscript
*** DONE Table [2/2]
1. [X] preliminary support
2. [X] column groups
*** DONE List [3/3]
1. [X] Unordered list
2. [X] Ordered list
3. [X] Definition list
*** DONE Directive
*** DONE Block [5/5]
1. [X] src
2. [X] quote
3. [X] example
4. [X] custom
5. [X] block nested in block
*** DONE Comment
*** DONE Drawer
Not exported.
*** DONE Horizontal
*** DONE Latex environment
*** DONE Quoting
*** DONE TOC
** DONE Export [2/2]
1. [X] json
2. [X] html