Skip to content

artem-derevyanko/table-rotate-cli

Repository files navigation

Table Rotate CLI

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.

Requirements

Before running this project, you need to have the following:

  • Node.js (v18.14.0+)
  • yarn >= v1.22.19

How to build

In order to use this program, first you need to build it:

  1. Clone repo.
  2. Run yarn to install dependencies.
  3. Run yarn build to build TS code.

How to use

The program has the following interface:

  node build/cli.js <input file>

The result is sent to the standard output stream.

Samples

In the samples directory you can find some CSV files that are ready to use:

  node build/cli.js samples/example.csv > output.csv

Tests

The code has some unit tests for crucial parts - input validation and table transformation. You can run them using the following command:

  yarn test

Others

Local Development

If you want to play around with code:

  1. Clone repo.
  2. Run yarn.
  3. Run yarn start:dev to watch code changes during development.

You also can use the predefined Samples and Tests.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published