Orgize
is a Rust library for parsing org-mode files:
use orgize::Org;
let org = Org::parse("* DONE Title :tag:");
for event in org.iter() {
// handling the event
}
orgize
also supports export to different formats, like html and json:
// export to html
let mut writer = Vec::new();
org.html(&mut writer).unwrap();
println!("{}", String::from_utf8(writer).unwrap());
// export to json, using serde
use serde_json::to_string;
println!("{}", to_string(&org).unwrap());
Features:
-
zero-copy: parser is built upon
nom
, outputsCow::Borrowed
when possible -
serde
support
Similar Projects:
org-rs
: another org-mode parser written in Rust, aims to port the elisp parser to Rust. Unlike orgize
, org-rs
parser is built with regex.
...
Further Work:
-
implement more parser, such as LaTeX Environments, check out STATUS.md for more detail
-
more documents
-
more testings
I've been continuously working on orgize
for about nine months and it is still not yet finished. For some personal reasons, I might be inactive for a while. So if you want to share your idea or even contribute, I will really appreciate it. : )