Project

switch-cli

0.0
No commit activity in last 3 years
No release in over 3 years
Switch helps you add multiple languages to your site by leveraging the power of google spreadsheets. It is a commandline tool providing you with an easy way to automate the process and avoid common mistakes. The most common use case of switch is for switching between a locale representation in JSON/YAML to a CSV (spreadsheet) based one and vice-versa. # Install ``` gem install switch-cli ``` # Usage ``` switch json2csv [input-dir] [output-file] ``` Converts multiple json files to be a single csv file with columns for each file, with the file name as the column header. If you do not specify an input-dir it will be taken as ./locales and output-file would be the direcotry name + .csv. ``` switch csv2json [input-file] [output-dir] ``` Converts a single csv file into multiple json files, with a file for each column using the key and order columns to construct the files.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.9.12
~> 3.4

Runtime

~> 2.0
~> 2.4
 Project Readme

Switch

Switch helps you add multiple languages to your site by leveraging the power of google spreadsheets. It is a commandline tool providing you with an easy way to automate the process and avoid common mistakes.

The most common use case of switch is for switching between a locale representation in JSON/YAML to a CSV (spreadsheet) based one and vice-versa.

Watch introduction video

Read introduction blog post

Install

gem install switch-cli

Usage

switch json2csv [input-dir] [output-file]

Converts multiple json files to be a single csv file with columns for each file, with the file name as the column header.

If you do not specify an input-dir it will be taken as ./locales and output-file would be the direcotry name + .csv.

switch csv2json [input-file] [output-dir]

Converts a single csv file into multiple json files, with a file for each column using the key and order columns to construct the files.