New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

col2json

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

col2json

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

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-75%
Maintainers
1
Weekly downloads
 
Created
Source

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"
}

Keywords

FAQs

Package last updated on 14 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc