Crate rad[−][src]
Expand description
R4d(rad)
R4d is a text oriented macro processor that tries to solve inconveniences of well-known m4 macro processor.
R4d is provided as both binary and library. Binary includes all features of optional dependencies. Library doesn’t provide any features by default so you can set them manually.
Features
- evalexpr : "eval" macro
- chrono : "date", "time" macro
- lipsum : "lipsum" macro
- csv : "from", "table" macro
- debug : Enable debug method
- color : Enable color prompt
- full : evalexpr+chrono+lipsum+csvSimple usage
Binary
rad input_file.txt
printf '...text...' | rad -o out_file.txtLibrary
use rad::Processor;
use std::path::Path;
let mut processor = Processor::new()
.purge(true)
.greedy(true)
.write_to_file(Some(Path::new("cache.txt")))?
.build();
processor.from_file(Path::new("input.txt"))?;
processor.print_result()?;Detailed r4d usage is illustrated in github page or in processor module
Re-exports
pub use processor::Processor;Modules
processor
Enums
Type Definitions
Type signature of basic macros