Converter from CSV file to ASCII table.
Clone the repository and install the dependencies:
git clone [email protected]:aleksandrilyin/csv_ascii_converter.git
cd csv_ascii_converter/
bundle install
- Ruby (MRI) >= 2.6
Run the script:
cat path/to/your/csvfile.csv | bundle exec ruby script.rb
$ 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| |
# +--+----+---------+
Run the specs:
bundle exec rake spec
Bug reports and pull requests are welcome on GitHub at https://github.com/aleksandrilyin/csv_ascii_converter.
The script is available as open source under the terms of the MIT License.