Expand description
§csvlens
This crate allows you to use csvlens as a library.
In your Cargo.toml
, add the following:
[dependencies]
csvlens = { version = "0.11.0", default-features = false, features = ["clipboard"] }
§Example
use csvlens::run_csvlens;
let out = run_csvlens(&["/path/to/your.csv"]).unwrap();
if let Some(selected_cell) = out {
println!("Selected: {}", selected_cell);
}
§Library Usage with options
ⓘ
use csvlens::{run_csvlens_with_options, CsvlensOptions};
let options = CsvlensOptions {
filename: "/path/to/your.csv".to_string(),
delimiter: Some("|".to_string()),
ignore_case: true,
debug: true,
..Default::default()
};
let out = run_csvlens_with_options(options).unwrap();
if let Some(selected_cell) = out {
println!("Selected: {}", selected_cell);
}
Modules§
Structs§
Functions§
- run_
csvlens - Run csvlens with a list of arguments. The accepted arguments are the same as the command line arguments for the csvlens binary.
- run_
csvlens_ with_ options - Run csvlens with options provided in a
CsvlensOptions
struct.