CtoC
About
CtoC is a CSV file converter that can convert CSV files into other filetypes depending on what you need. CtoC has support for two output options as of version 0.0.5 those are JSON and TSV (Tab Seperated Values) the library comes with some premade CSV datasets to allow you to mess around with the tool a little bit before you run it on your real datasets.
Usage
CtoC is a command line application that requires NodeJS to be on the system at runtime.
you can install CtoC by running:
npm install ctoc
To use CtoC, simply run the following with all required arguments
ctoc -f <filename> -t <output format> -m <conv/fix/enc/dec (convert/fix/encrypt/decrypt)> -s <data seperator (optional)>
Currently supported output formats
extenstion | name |
---|
md | Markdown |
json | JavaScript Object Notation (JSON) |
html | Hyper Text Markup Language (HTML) |
psv | Pipe (|) Seperated Values |
tsv | Tab Seperated Values |
js | JavaScript (value export ready) |
hex | Hexadecimal encoded file |
Speed
CtoC is written in javascript, a language known to be slower than its counterparts, however CtoC is not a slouch, when converting to HTML and Markdown tables, it can convert roughly 61Kb in ~200ms**. however if you are converting to an object based file such as JavaScript export modules or JSON, the conversion can slow down significantly due to the conversion and writing of the data. this is simply an inefficiency in the code and we will try to fix it as well as we can.
Basically, for conversion to visible files which can be rendered by a browser, CtoC is lightning fast. but for objective languages it is slower. For conversion between the SV file famly it is also incredibly quick being able to convert a 615Kb test payload into a valid TSV in ~2000 ms*, and the same payload can be converted to a PSV in ~200 ms*
Coming Soon:
Callbacks for the import module.
*times are objective and will not always align with the above data, please perform benchmarking on your own computer before citing these timings in an issue.*
Patch notes:
1.0.7
Fixed decryption of encrypted CSV files.
Added callbacks which return data on the produced file.
Added test module.
Speed and stability improvements on js module.
All round efficiency improvements
1.0.4
Added two new modes (enc and dec for Encrypting data and Decrypting data respectively).
Minor stability improvements.
Minor speed increases across all export types.
Removed console outputs for import module.
1.0.2
Minor improvements to multi file conversion in the import module.
1.0.1
Major stability increase.
File size checking added (stops those pesky memory errors from happening).
Added import module for all of your programmatic conversion needs.
1.0.0
Public 1.0.0 is released !!! (16th April 2019).
This software is provided as is and is not maintained on a regular schedule, any problems should be reported in an ussue on the repository and they will be dealt with once i have the time.
Kindly,
Fatal.