7 releases

new 0.2.3 Feb 21, 2024
0.2.2 Mar 29, 2023
0.2.1 Aug 3, 2022
0.1.2 Jul 4, 2022

#378 in Filesystem

Download history 20/week @ 2023-11-03 26/week @ 2023-11-10 9/week @ 2023-11-17 16/week @ 2023-11-24 21/week @ 2023-12-01 4/week @ 2023-12-08 27/week @ 2023-12-15 21/week @ 2023-12-22 6/week @ 2023-12-29 12/week @ 2024-01-05 6/week @ 2024-01-12 7/week @ 2024-01-19 23/week @ 2024-01-26 17/week @ 2024-02-02 26/week @ 2024-02-09 189/week @ 2024-02-16

255 downloads per month

MIT/Apache

9KB
168 lines

csv-zip-maker-rs

CSV and ZIP maker

Documentation

Features

  • CSV and Zip file make in temp dir.
  • Cleanup files at drop.
  • Use file instead of memory.

Changes

v0.2.3 (2024/02/21)

  • modify dependencies

v0.2.2 (2023/03/29)

  • change CsvMaker#write signature

v0.2.1 (2022/08/03)

  • modify Readme sample
  • change ambiguous error
  • change write to write_all

v0.2.0 (2022/08/03)

  • hide customizer(breaking change)

v0.1.2 (2022/07/04)

  • fix Readme document path

v0.1.1 (2022/07/02)

  • fix Readme
  • fix Cargo.toml categories

v0.1.0 (2022/07/02)

  • first release

Examples

use csv_zip_maker::{CsvExcelCustomizer, CsvZipError, CsvZipMaker};

fn main() -> Result<(), CsvZipError> {
    let mut maker = CsvZipMaker::new("test", "summary")?;
    let mut csv_maker = maker.make_csv_maker_for_excel("summary1")?;
    csv_maker.write(&vec!["aaa", "bbb"])?;
    csv_maker.write(&vec!["ccc", "ddd"])?;
    maker.add_csv(&mut csv_maker)?;
    let mut csv_maker = maker.make_csv_maker("summary2")?;
    csv_maker.write(&vec!["111", "222"])?;
    csv_maker.write(&vec!["333", "444"])?;
    maker.add_csv(&mut csv_maker)?;

    let path_buf = maker.make_zip_file()?;
    std::fs::copy(path_buf, "test.zip")?;
    Ok(())
}

Dependencies

~4–15MB
~162K SLoC