My rewrite of basic cli utilities using Rust
jorge-cab / cli_utils_rs Goto Github PK
View Code? Open in Web Editor NEWMy rewrite of basic cli utilities using Rust
My rewrite of basic cli utilities using Rust
As a user, I want to display the contents of a file so that I can read it in the terminal.
Ex:
cat ./story.txt
Out -> "Once upon a time..."
Test reading from a file, handling of non-existent files, and empty files.
After #6 now make the unit tests for cat
this might involve refactoring some of the code to make it viable and achieve as much code coverage as possible.
Make grep be able to search in a certain file a certain string.
Ex:
grep Title ./books
-> Title1
grep hello ./greetings
-> hello there
There is a library for this
There seems to be a bunch of boiler plate code for this
Is there a way to make it easy?
As a user, I want to list the files in a directory so that I can see what it contains.
Ex:
ls
-> Myfile1.txt bin hello.txt
Test listing files
What are feature in Cargo.toml? Example here: https://github.com/uutils/coreutils/blob/ac5684dc8d26b3ac6f27f610dfdd38cac0e79822/Cargo.toml#L24C1-L34
Can they be used to improve the project?
Implement the sort util to sort out the lines contained within a file
The user can now select the util they want to use. It will be the first argument.
Ex:
cargo run echo asdf
out: asdf
cargo run grep asdf
-> executes grep logic
add unit tests
Currently everything is within the lib.rs
file. We want to
Refactor Tests
Refactor Run Functions
Refactor General logic Ex: bin_selector
Changes pass the Unit tests
As title
Currently I'm not sure how to use find so implementing it myself will be hard, this Spike is to get familiar with the command
To start off the project when running cargo run we should be able to handle:
echo asdf
asdf
echo "asdf"
asdf
Acceptance Criteria
Refactor to use a custom error type in general in the rewrite to give us more flexibility and robustness with Error handling.
Implement at least the following types:
Confirm tests are still working
as title
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.