16 releases (1 stable)
Uses old Rust 2015
1.0.0 | Sep 21, 2018 |
---|---|
0.7.1 | Sep 11, 2018 |
0.7.0 | Jul 25, 2018 |
#1001 in Filesystem
Used in 2 crates
19KB
86 lines
nya.rs
nya
is a small and cute file processor. It does only what you want it to do, and nothing else.
Installation
cargo add nya
Install cargo-edit to extend Cargo, allowing you to add, remove, and upgrade dependencies by modifying your Cargo.toml file from the command line.
Usage
You'd use nya
somewhat like this:
extern crate nya;
use nya::{ignore, create_middleware};
fn main() {
nya::run(vec![
ignore(vec!["target/", ".DS_Store"]),
create_middleware(|files| {
let file = &mut files[0];
file.content = "test hello".to_string();
}, Some("source"), Some("destination"))
]).unwrap()
}
This reads all files from a directory, and replaces the content of the first one with "test hello". Full documentation can be found on docs.rs.
License
Licensed under the AGPL-3.0+. See LICENSE.
Dependencies
~3–11MB
~118K SLoC