Skip to content
François Benaiteau edited this page Mar 8, 2018 · 1 revision

CSV2JSON

With minimum required arguments


babelish csv2json --filename=test/data/test_data.csv --langs=English:en

babelish csv2json --filename=test/data/test_data_multiple_langs.csv --langs=English:en German:de French:fr Spanish:es

JSON2CSV

With minimum required arguments

babelish json2csv --filenames=en.json --csv-filename=testjson.csv

babelish json2csv --filenames=en.json de.json fr.json es.json --csv-filename=testmjson.csv

Result:

Variables,en.json,de.json,fr.json,es.json
GREETINGS,Hello,Hallo,Salut,Buenos dias
ANOTHER_STRING,testEN,"","",""

Overriding Headers names

keep the same order for filenames and headers

babelish json2csv --filenames=en.json de.json fr.json es.json --csv-filename=testmjson.csv --headers=Variables English German French Spanish

Result:

Variables,English,German,French,Spanish
GREETINGS,Hello,Hallo,Salut,Buenos dias
ANOTHER_STRING,testEN,"","",""
Clone this wiki locally