1.1.2 • Published 1 year ago

col2json v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

A simple CLI to convert columns of CSV and TSV files to multiple json files.

The first column of the CSV defines the keys of the exported object.

The first row of the CSV defines the filename of each exported json file.

Usage:

CSV to JSON

npx col2json translations.csv

TSV to JSON

npx col2json translations.tsv

Specify output directory

npx col2json translations.tsv mydirectory

Example

Given a translation.csv file with this content

keyenites
helloHelloCiaoHola
codeCodeCodiceCodigo

running npx col2json translations.csv will create 3 json files:

en.json

{
    "hello": "Hello",
    "code": "Code"
}

it.json

{
    "hello": "Ciao",
    "code": "Codice"
}

es.json

{
    "hello": "Hola",
    "code": "Codigo"
}
1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago