Crates.io | shelve |
lib.rs | shelve |
version | 0.2.0 |
source | src |
created_at | 2024-09-07 00:27:25.022608 |
updated_at | 2024-11-02 13:59:39.362668 |
description | A simple command-line tool to pretty print CSV files grouped by a column |
homepage | |
repository | https://github.com/matagus/shelve |
max_upload_size | |
id | 1366817 |
size | 37,470 |
A command-line tool written in Rust for pretty-printing CSV files grouped by a specified column or field.
cargo install shelve
shelve --help
Usage: shelve [OPTIONS] [FILENAME]...
Arguments:
FILENAME CSV file to read [default: stdin]
Options:
-c, --column-number <COLUMN_NUMBER> Column number to group by [default: 1] (first colum)
-h, --help Print help
-V, --version Print version
Given the following CSV file containing data about tasks and their status:
Task ID,Task Title,Status,Assignee,Priority
1,Implement feature A,In Progress,John Doe,High
2,Fix bug B,Done,Jane Doe,Low
3,Write tests for feature A,In Progress,John Doe,Medium
4,Refactor code,To Do,Jane Doe,High
5,Deploy to production A and B,To Do,John Doe,Low
6,Write missing documentation for feature A,Done,Peter Foo,Medium
7,Fix bug C,To Do,Alice Bar,High
8,Write tests for feature A,In Progress,John Doe,Low
Grouping by the Status
column (column number 2):
shelve -c 3 example.csv
Done:
2, Fix bug B, Jane Doe, Low
6, Write missing documentation for feature A, Peter Foo, Medium
In Progress:
1, Implement feature A, John Doe, High
3, Write tests for feature A, John Doe, Medium
8, Write tests for feature A, John Doe, Low
To Do:
4, Refactor code, Jane Doe, High
5, Deploy to production A and B, John Doe, Low
7, Fix bug C, Alice Bar, High
Grouping by the Priority
column (column number 4):
shelve -c 5 example.csv
High:
1, Implement feature A, In Progress, John Doe
4, Refactor code, To Do, Jane Doe
7, Fix bug C, To Do, Alice Bar
Low:
2, Fix bug B, Done, Jane Doe
5, Deploy to production A and B, To Do, John Doe
8, Write tests for feature A, In Progress, John Doe
Medium:
3, Write tests for feature A, In Progress, John Doe
6, Write missing documentation for feature A, Done, Peter Foo
Grouping by the Assignee
column (column number 3):
shelve -c 4 example.csv
Alice Bar:
7, Fix bug C, To Do, High
Jane Doe:
2, Fix bug B, Done, Low
4, Refactor code, To Do, High
John Doe:
1, Implement feature A, In Progress, High
3, Write tests for feature A, In Progress, Medium
5, Deploy to production A and B, To Do, Low
8, Write tests for feature A, In Progress, Low
Peter Foo:
6, Write missing documentation for feature A, Done, Medium
The command can also read input from stdin
:
>> cat sample-files/tasks.csv | shelve -c 5
High:
1, Implement feature A, In Progress, John Doe
4, Refactor code, To Do, Jane Doe
7, Fix bug C, To Do, Alice Bar
Low:
2, Fix bug B, Done, Jane Doe
5, Deploy to production A and B, To Do, John Doe
8, Write tests for feature A, In Progress, John Doe
Medium:
3, Write tests for feature A, In Progress, John Doe
6, Write missing documentation for feature A, Done, Peter Foo
Or reading multiple files at once:
shelve -c 5 sample-files/tasks.csv sample-files/more-tasks.csv
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.