Skip to content

aleksandrilyin/csv_ascii_converter

Repository files navigation

Build

CSV ASCII Converter

Converter from CSV file to ASCII table.

Installation

Clone the repository and install the dependencies:

git clone [email protected]:aleksandrilyin/csv_ascii_converter.git
cd csv_ascii_converter/
bundle install

Supported Ruby versions

  • Ruby (MRI) >= 2.6

Usage

Run the script:

cat path/to/your/csvfile.csv | bundle exec ruby script.rb

Usage example

$ cat public/sample.csv
# int;string;money
# 1;aaa bbb ccc;1000.33
# 5;aaaa bbb;0.001
# 13;aa bbbb;10000.00
$ cat public/sample.csv | bundle exec ruby script.rb
# +--+----+---------+
# | 1|aaa | 1 000,33|
# |  |bbb |         |
# |  |ccc |         |
# +--+----+---------+
# | 5|aaaa|     0,01|
# |  |bbb |         |
# +--+----+---------+
# |13|aa  |10 000,00|
# |  |bbbb|         |
# +--+----+---------+

Testing

Run the specs:

bundle exec rake spec

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/aleksandrilyin/csv_ascii_converter.

License

The script is available as open source under the terms of the MIT License.

About

Converter from CSV file to ASCII table

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages