Skip to content

Latest commit

 

History

224 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#+title: org-rust

This crate aims to provide parsing support for [[https://orgmode.org/][org-mode]] based on [[https://orgmode.org/worg/dev/org-syntax-edited.html][the official spec]].
The goal is to be mostly spec compliant, and allow for exporting the generated AST to other formats and applying modifications to it. View the demo at https://org-rust.pages.dev/.


** Installation

~org-rust~ can be used as a CLI tool or as a library via the ~org-rust-parser/org-rust-exporter~ crates.

*** Arch


[[https://aur.archlinux.org/packages/org-rust][org-rust]] can be found on the AUR.

#+begin_src bash
paru -S org-rust
#+end_src

*** Cargo

#+begin_src bash
cargo install org-rust
#+end_src


** Dependencies

- [[https://github.com/bitflags/bitflags][bitflags]]: provides a macro to generate bitflags from a struct.

  Extremely useful for handling markup delimiters and creating object groups (standard set, minimal set, etc...).

- [[https://docs.rs/derive_more/latest/derive_more/][derive_more{from}]]: allows deriving ~From~ on a enum.

  Mostly a convenience crate to make it easy to create a ~Node~ from an ~Expr~.

- [[https://github.com/rust-lang/regex][regex]]: provides fast string search functions.

   Used in parsing block / LaTeX environments to find the ending token (~#+end_NAME~). I expect these elements to be fairly large on average, so being able to do this quickly is very good!

- [[https://github.com/rust-phf/rust-phf][phf]]: allows initializing compile time look up tables.

   Not absolutely necessary, but makes it faster/easier to group together characters like markup delimiters, entities, etc...

*** Development

Refer to the [[./docs][documentation]] for developer-specific information & syntax-progress.

About

A parser for Org-mode documents

Resources

Stars

25 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages