|
|
|
|
@ -122,6 +122,12 @@ pub(crate) struct RawArguments {
|
|
|
|
|
/// avoid nth first rows of xlsx file
|
|
|
|
|
#[arg(short = 'k', long, default_value_t = 0)]
|
|
|
|
|
pub skip_rows: u32,
|
|
|
|
|
/// avoid empty lines
|
|
|
|
|
#[arg(short, long, default_value_t = false)]
|
|
|
|
|
pub avoid_empty_rows: bool,
|
|
|
|
|
/// consider first line (after row skipped) as header line
|
|
|
|
|
#[arg(short, long, default_value_t = false)]
|
|
|
|
|
pub header: bool,
|
|
|
|
|
/// change end of line character
|
|
|
|
|
#[arg(short, long, default_value_t = String::from("\n"))]
|
|
|
|
|
pub end_of_line: String,
|
|
|
|
|
@ -160,6 +166,10 @@ pub struct Arguments {
|
|
|
|
|
pub(crate) number_rows: NumberRows,
|
|
|
|
|
/// Avoid nth first rows of xlsx file
|
|
|
|
|
pub(crate) skip_rows: u32,
|
|
|
|
|
/// avoid empty lines
|
|
|
|
|
pub avoid_empty_rows: bool,
|
|
|
|
|
/// first line (after row skipped) is header line
|
|
|
|
|
pub header: bool,
|
|
|
|
|
///# csv output specific options
|
|
|
|
|
/// Separator for output
|
|
|
|
|
pub(crate) separator: char,
|
|
|
|
|
@ -194,6 +204,8 @@ impl Default for Arguments {
|
|
|
|
|
trim: Default::default(),
|
|
|
|
|
number_rows: Default::default(),
|
|
|
|
|
skip_rows: Default::default(),
|
|
|
|
|
avoid_empty_rows: false,
|
|
|
|
|
header: false,
|
|
|
|
|
end_of_line: String::from("\n"),
|
|
|
|
|
replace_end_of_line_by: Default::default(),
|
|
|
|
|
}
|
|
|
|
|
@ -231,6 +243,8 @@ impl From<RawArguments> for Arguments {
|
|
|
|
|
trim: raw.trim,
|
|
|
|
|
number_rows: raw.number_rows,
|
|
|
|
|
skip_rows: raw.skip_rows,
|
|
|
|
|
avoid_empty_rows: raw.avoid_empty_rows,
|
|
|
|
|
header: raw.header,
|
|
|
|
|
end_of_line: raw.end_of_line,
|
|
|
|
|
replace_end_of_line_by: raw.replace_end_of_line_by,
|
|
|
|
|
}
|
|
|
|
|
|