An open API service indexing awesome lists of open source software.

https://github.com/roy-corentin/org_mob_parser

Parser for Org files
https://github.com/roy-corentin/org_mob_parser

crystal-lang org-mode parser

Last synced: about 1 year ago
JSON representation

Parser for Org files

Awesome Lists containing this project

README

          

* ORG MOB PARSER

OrgMobParser is a high-performance parser for [[https://orgmode.org/][Org]] files, powered by the [[https://crystal-lang.org/][Crystal]] programming language.

** Introduction
OrgMobParser was developed with the primary purpose of serving as the parsing engine for a backend application known as =OrgMob= (Work in Progress).
However, it is a versatile tool, and you are free to use it in any way that suits your needs!

** Features
+ =Blazingly Fast=: Thanks to Crystal's efficiency, OrgMobParser offers exceptional parsing speed for Org files.
+ =Easy Integration=: Seamlessly integrate OrgMobParser into your Crystal projects or any compatible application.
+ =Inspired by UniOrg=: The format used by OrgMobParser closely resembles that of [[https://github.com/rasendubi/uniorg][UniOrg]]. However, please note that full compatibility with UniOrg is not a current priority.

** Installation
1. Add the dependency to your =shard.yml=

#+begin_src yaml
dependencies:
org_mob_parser:
github: roy-corentin/org_mob_parser
#+end_src

2. Run =shards install=

** Usage

#+begin_src crystal
require "org_mob_parser"
#+end_src

*** For Custom TODO Keywords
#+begin_src crystal
parser = OrgMob::Parser.new

parser.configure do |c|
c.todo_keywords = ["TODO", "[ ]", "TODO 🚩", "DOING"]
end
#+end_src

*** For Custom DONE Keywords
#+begin_src crystal
parser = OrgMob::Parser.new

parser.configure do |c|
c.done_keywords = ["DONE", "[X]", "DONE ❌"]
end
#+end_src

*** To Parse Your Text
#+begin_src crystal
parser = OrgMob::Parser.new
parser.parse("* Your Org\nyes your org note") # Return a json in the OrgMob Format
parser.parse("./path_to_org_file") # Return a json in the OrgMob Format
#+end_src

** Development

*** Parser System
+ [X] parse emphasis
+ [X] parse top file properties
+ [X] parse block code
+ [X] parse block quote
+ [X] parse title properties
+ [X] parser table

*** Parser Lib
+ [X] accept file to parse

*** Parser Binary
+ [X] binary to parse string or file

*** Project
+ [ ] Add benchmark

** Contributing

1. Fork it ()
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

** Contributors

- [[https://github.com/roy-corentin][Corentin Roy]] - creator and maintainer