Open benwbooth opened 2 months ago
Sure. I'm curious how would you like to use csvlens as a library? The way csvlens is written now is very much an application, but if there's a way it can be useful as a library I'm happy to help.
Sure. I want to be able to display paged CSV table in my application. It would be sufficient to be able to fork/exec my process and call the main function of csvlens directly. Thanks!
I added a lib.rs
in the main branch to expose the function that the binary's main
would call. It can be used this way:
use csvlens::run_csvlens;
let out = run_csvlens(&["/path/to/your.csv", "--delimiter", "\t"]).unwrap();
if let Some(selected_cell) = out {
println!("Selected: {}", selected_cell);
}
Feel free to try it and let me know if it works in your case.
I would like to be able to use
csvlens
as a library to integrate into one of my tools. If I addcsvlens = "*"
to myCargo.toml
, I get the following warning:Is it possible to add a lib target to csvlens so that it can be used as a library?
Thanks!