Skip to content

Commit c10273c

Browse files
committed
docs(readme): Update readme for clarity - wip: adding variable paths to docs
style: remove deadcode
1 parent 86f7902 commit c10273c

3 files changed

Lines changed: 12 additions & 36 deletions

File tree

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,23 @@
22

33
## Overview
44

5-
This program provides a CLI tool to parse CSV files, filtering out columns & rows based on criteria specified in a configuration file (`config.json`).
6-
Users can optionally override settings using command-line arguments, ensuring flexibility and adaptability to various use cases.
5+
This program provides a CLI tool to parse CSV files, filtering out columns &
6+
rows based on criteria specified in a configuration file (`.\config\config.json`).
7+
Users can optionally override settings using command-line arguments,
8+
ensuring flexibility and adaptability to various use cases.
79

810
## Configuration
911

10-
> In the follow example(s) `$ROOT` is the directory the binary/`.exe` resides in.
12+
> In the follow example(s) `$ROOT` is the directory of the binary file or `.exe`.
1113
1214
By default, the program will search for a config directory & config file in the following locations:
1315
`$ROOT/config` & `$ROOT/config/config.json` respectively.
1416

15-
If the config folder or the config file is not found,
16-
the program will generate a dummy config file with similar struct and values to the below snippet in a `config` directory in the root of the binary.
17+
If the config folder and/or the config file is not found,
18+
the program will generate a 'dummy' config file with similar structure & values to the snippet below.
19+
You can find the newly created file at `$ROOT/config/config.json`.
1720

18-
The configuration file (`config.json`) should be formatted as follows:
21+
The configuration file (`$ROOT/config/config.json`) should be formatted as follows:
1922

2023
```json
2124
{
@@ -44,8 +47,8 @@ The configuration file (`config.json`) should be formatted as follows:
4447
}
4548
```
4649

47-
- Note: The code handles both Windows and Linux-style paths.
48-
This does not mean the Filesystem you're interacting with via the tool will necessarily play nice.
50+
- Pro-Tip!: The code handles both Windows and Linux-style paths.
51+
That being said - Filesystem themselves may not play nicely if you're mixing OS paths.
4952

5053
### Fields:
5154

src/prelude.rs

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,6 @@ pub fn update() -> Result<String> {
7777
Ok(self_update::cargo_crate_version!().to_string())
7878
}
7979
}
80-
81-
// let status = match std::thread::spawn(stauts_cls).join().unwrap() {
82-
// Ok(v) => {
83-
// info!("Update successful. Restarting with new version");
84-
// v
85-
// }
86-
// Err(_) => {
87-
// error!("Error updating.");
88-
// warn!("Update not completed. Continuing with current version");
89-
// return Ok(self_update::cargo_crate_version!().to_string());
90-
// }
91-
// };
92-
93-
// Ok(status.version().to_string())
9480
}
9581

9682
fn first_author() -> String {
@@ -104,13 +90,4 @@ pub const NO_CONFIG_FILE_MSG: &str = r#"
10490
Config file either doesn't exist,
10591
is empty, or there was an error parsing it.
10692
Please check the config.json file.
107-
"#;
108-
109-
// "Config file either doesn't exist,\n
110-
// is empty,\n
111-
// or there was an error parsing it,\n
112-
// please check the config.json file",
113-
//
114-
//
115-
//
116-
//
93+
"#;

src/state.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ pub struct State<'a> {
3333
pub config: Config,
3434
pub retained_data: RetainedData,
3535
pub csv_pipeline: CsvPipeline,
36-
// pub handler: CsvHandler,
37-
// pub processor: Processor,
3836
pub output_data: OutputData,
3937
phantom_data: PhantomData<&'a ()>,
4038
}
@@ -114,7 +112,6 @@ impl State<'_> {
114112
/// state.process(&mut rdr).expect("Failed to process CSV data");
115113
/// ```
116114
pub fn process(&mut self) -> Result<()> {
117-
// Processor::process(&mut self.retained_data, &self.handler, rdr)
118115
self.csv_pipeline.process(&mut self.retained_data)
119116
}
120117

@@ -130,7 +127,6 @@ impl State<'_> {
130127
/// ```
131128
pub fn deduplicate(&mut self) {
132129
self.csv_pipeline.deduplicate(&mut self.retained_data);
133-
// self.processor.deduplicate(&mut self.retained_data);
134130
}
135131

136132
/// Outputs the retained data based on the configured output type.

0 commit comments

Comments
 (0)