orgmode
orgmode copied to clipboard
Org-mode parser in Clojure
-
Orgmode
A Clojure library designed to parse org-mode files into clojure data structures.
** Status Usable, but not perfect, parse the [[test/orgmode/test.org][test]] file to see some of the issues.
** Installation
Using =deps=, add the coordinate to your =deps.edn=:
#+BEGIN_SRC clojure {:deps { orgmode {:git/url "https://github.com/bnbeckwith/orgmode" :sha "52c153649ebff4c90f50be32458d413ef416aeb7"} }} #+END_SRC
If you are using =lein=, just add it as a dependency:
#+BEGIN_SRC clojure [bnbeckwith.com/orgmode "0.7.5"] #+END_SRC
** Usage
In your favorite terminal, launch a repl with
#+begin_src bash clojure -Adev #+end_src
#+BEGIN_SRC clojure (ns main (:require [orgmode.core :as org]))
(org/parse-str "* Headline") ; {:content [{:type :headline, :text "Headline", :todo nil, :level 1, :content [], :tags nil}], :level 0}
(org/parse-str "[[http://clojure.org][Clojure]]") ; {:content [{:inline true, :type :link, :uri "http://clojure.org", :content ["Clojure"]}], :level 0}
(org/parse "File.org") ; File structure #+END_SRC
-
License
Copyright © 2012-2020 Benjamin Beckwith
Distributed under the Eclipse Public License, the same as Clojure.
-
Contributors
- Benjamin Beckwith
- David Pham
- Kevin Pavao