Skip to content

roy-corentin/org_mob_parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ORG MOB PARSER

OrgMobParser is a high-performance parser for Org files, powered by the 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 UniOrg. However, please note that full compatibility with UniOrg is not a current priority.

Installation

  1. Add the dependency to your shard.yml
dependencies:
  org_mob_parser:
    github: roy-corentin/org_mob_parser
  1. Run shards install

Usage

require "org_mob_parser"

For Custom TODO Keywords

parser = OrgMob::Parser.new

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

For Custom DONE Keywords

parser = OrgMob::Parser.new

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

To Parse Your Text

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

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 (https://github.com/roy-corentin/org_mob_parser/fork)
  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