docs: add README.md

This commit is contained in:
PoiScript 2019-02-06 20:50:18 +08:00
parent 9b49ea943f
commit 346ebc83d7
2 changed files with 49 additions and 0 deletions

View file

@ -4,6 +4,7 @@ version = "0.1.0"
authors = ["PoiScript <poiscript@gmail.com>"]
description = "A Rust library for parsing orgmode files."
repository = "https://github.com/PoiScript/orgize"
readme = "README.md"
license = "MIT"
keywords = ["orgmode","emacs","parser"]

48
README.md Normal file
View file

@ -0,0 +1,48 @@
# Orgize
Orgize is a Emacs Org-mode parser written by pure Rust. It behaves like a pull
parser (returning an iterator of events) but not exactly.
Besides, orgize also provides some mechanism for exporting org-mode files to
various formats, e.g. HTML.
## Usage
```toml
[dependencies]
orgize = "0.1.0"
```
```rust
// Rust 2015 only
extern crate orgize;
```
## Example
```rust
use orgize::Parser;
fn main() {
let parser = Parser::new(
r#"* Title 1
*Section 1*
** Title 2
_Section 2_
* Title 3
/Section 3/
* Title 4
=Section 4="#,
);
for event in parser {
// handling the event
}
}
```
Alternatively, you can use the built-in render.
## License
MIT