TerenYeung / poeditor-cli

POEditor cli is the Standard Tooling for workflow of POEditor.
3 stars 7 forks source link

POEditor cli is the Standard Tooling for workflow of POEditor. ![language](https://img.shields.io/badge/language-node-gcf.svg) [![npm package](https://img.shields.io/npm/v/poeditor.svg?style=flat-square)](https://www.npmjs.com/package/poeditor) [![NPM downloads](http://img.shields.io/npm/dm/poeditor.svg?style=flat-square)](https://www.npmjs.com/package/poeditor) ![license](https://img.shields.io/badge/license-Anti%20996-99ccff.svg)

✨ Features

📦 Install

If you haven't installed Node.js, please install it first, here.

$ npm install poeditor -g

🔨 Configuration

Create a poeditor-config.json in the root directory, and config information as follows:

{
  "apiToken": "",                     // POEditor api token
  "projectId": 0,                     // project id
  "fileType": "",                     // fileType to upload or download, now only supports files format ( android_strings, apple_strings, json), can config android_strings, apple_strings, js or json
  "targetDir": ""                     // directory where translated files live
}

🤜🏼 Usage

Pull all translated files from upstream of POEditor.

$ poeditor pull

Push all pre-translated files from downloadstream of targetDir in poeditor-config.json.

$ poeditor push