Crates.io | org-tangle |
lib.rs | org-tangle |
version | 0.1.5 |
source | src |
created_at | 2018-09-14 15:08:27.806068 |
updated_at | 2018-10-05 17:52:11.268608 |
description | A faster way to tangle org-mode. |
homepage | |
repository | https://github.com/parsing-tech/org-rs |
max_upload_size | |
id | 84711 |
size | 4,907 |
A command line tool to tangle code blocks in org file to source code file.
I recommend ntangle, if you need more complete org-mode supports.
To build the program, nightly rust toolchain is needed.
rustup
is the tool to help programmers install rust toolchains.
Then do:
rustup install nightly
cargo +nightly install org-tangle
USAGE:
org-tangle [FLAGS] [PATH]...
FLAGS:
-r, --recursive recursively traverse <DIR>
-h, --help Prints help information
-V, --version Prints version information
ARGS:
<PATH>... <PATH> can be <FILE> or <DIR>
ignore non unicode <PATH>
ignore non `.org` files
ignore `.org` files without tangle property
In file engine.org
#+property: tangle lib.rs
lib.rs
#+begin_src <lang>
and #+end_src
#+begin_src rust
fn tangle (string: &str) -> Result <String, TangleError> {
let mut result = String::new ();
let mut lines = string.lines ();
while let Some (line) = lines.next () {
if block_begin_line_p (line) {
tangle_collect (&mut result, &mut lines)?;
}
}
Ok (result)
}
#+end_src
engine.org
is tangled to lib.rs