-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Allow usage of csvlens as a library #90
Comments
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 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. |
Just wanted to share that I integrated csvlens with qsv 0.134.0 and it works like a charm! |
As an extension to this - it would be amazing if it could work with an array of records (like the way https://docs.rs/csv/latest/csv/ works with serde structs). |
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!
The text was updated successfully, but these errors were encountered: