Hey there! Thanks for viewing my WCAT-CLI project. Below you can find the basic overview of this project and you can use this on your pc too. Just install node before trying to run it if you haven't already.
After Installing the prerequisites now you'd need to run the command sudo npm link(for mac) & npm link(for other OS) in order to be able to use 'wcat' in place of 'node index.js'.
Now that you're all set with the prerequisites let me give you short overview of the functionalitites that have been added:-
- Multiple flags to make our custome CLI perform like a real CLI which includes functionalities like:-
- Reading file/files
- Writing in file/files
- Appending in file/files
- Removing certaing characters etc.
You can find detailed explanation of each and every flag that has been added into this CLI till now below along with a link that'll lead you to it's demo.
- In order to give this custom CLI a feel of an original one we've created a custom script that enabled us to use wcat in place of npm run wcat while doing/performing something with our CLI.
Flag name | Flag's function | Flag's Demo |
---|---|---|
-pd |
print the data of the file given. | Click here |
-sd |
sort the data of the file given. | Click here |
-rs |
split the data with spaces in between and then join them without any space betweeen them. | Click here |
-rn |
split the data whenever encounter a "newline" and then join all together in one line. | Click here |
-remspec |
remove specific argument that we'd pass in the statement with a % in front of it. | Click here |
-rsc |
remove whatever is given in front of this flag except letters and spaces. | Click here |
-s |
add serialised numbering in front of all the lines present in the file given. | Click here |
-sn |
add serialised numbering in front of all the non-empty lines present in the file given. | Click here |
-rel |
remove all extra/empty lines present in our file | Click here |
-rel1 |
remove all extra/empty lines except 1 empty line after every non-empty line present in our file | Click here |
-a2f1 |
read the given files and then append their data and add it into a new file. | Click here |
-cf |
then delete/clear the contents of the given file/files. | Click here |
-df |
then delete the given file/files. | Click here |