This CLI program takes as input a CSV in a certain format, converts the input data into square tables (if possible) and rotates those tables clockwise. The result is sent to the standard output stream.
Before running this project, you need to have the following:
Node.js
(v18.14.0
+)yarn
>=v1.22.19
In order to use this program, first you need to build it:
- Clone repo.
- Run
yarn
to install dependencies. - Run
yarn build
to build TS code.
The program has the following interface:
node build/cli.js <input file>
The result is sent to the standard output stream.
In the samples
directory you can find some CSV files that are ready to use:
node build/cli.js samples/example.csv > output.csv
The code has some unit tests for crucial parts - input validation and table transformation. You can run them using the following command:
yarn test
If you want to play around with code:
- Clone repo.
- Run
yarn
. - Run
yarn start:dev
to watch code changes during development.