csv-txt-excel-parallel-toolkit 0.4.7

A parallel and fast command line toolkit for small and large (>10G) CSV, TXT, and EXCEL files, with a unified api.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::utils::{cli_result::CliResult, table::Table};
use std::io::{self, BufRead};

pub fn run(sep: &str) -> CliResult {
    let mut rows = vec![];

    for l in io::stdin().lock().lines() {
        let l = l?.split(sep).map(|i| i.to_owned()).collect::<Vec<_>>();
        rows.push(l);
    }

    Table::from_records(rows).print_blank()?;

    Ok(())
}