# grunt-poeditor-gd

> Call POEditor's APIs, upload & download from a grunt task

Latest version **0.2.1** (published 2024-01-04) · 0 weekly downloads

## Install

```sh
npm install grunt-poeditor-gd
pnpm add grunt-poeditor-gd
yarn add grunt-poeditor-gd
bun add grunt-poeditor-gd
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2024-01-04 |
| First published | 2022-06-20 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.0 |
| Dependencies | 3 |
| Unpacked size | 12 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | George Dawoud |
| Maintainers | dawoudio |
| Keywords | gruntplugin, poeditor, i18n, l10n, locale |

## Links

- npm: https://www.npmjs.com/package/grunt-poeditor-gd
- Repository: https://github.com/bond211/grunt-poeditor-gd
- Homepage: https://github.com/bond211/grunt-poeditor-ab
- Issues: https://github.com/bond211/grunt-poeditor-gd/issues
- npm.io page: https://npm.io/package/grunt-poeditor-gd

## Dependencies (3)

- [wget](https://npm.io/package/wget.md) 0.0.1
- [colors](https://npm.io/package/colors.md) ^0.6.2
- [request](https://npm.io/package/request.md) ^2.88.2

## Alternatives

- [messageformat](https://npm.io/package/messageformat.md) — 329.7K weekly downloads
- [@mintlify/scraping](https://npm.io/package/@mintlify/scraping.md) — 294.8K weekly downloads
- [@mintlify/previewing](https://npm.io/package/@mintlify/previewing.md) — 209.5K weekly downloads
- [@mintlify/prebuild](https://npm.io/package/@mintlify/prebuild.md) — 209.5K weekly downloads
- [@mintlify/link-rot](https://npm.io/package/@mintlify/link-rot.md) — 206.3K weekly downloads

## Recent versions

- 0.2.1 (latest) — 2024-01-04
- 0.2.0 — 2022-06-20

## README

# grunt-poeditor-gd

> Call POEditor's APIs, upload & download from a grunt task.

## Getting Started

First, check out [POEditor](https://poeditor.com) if you don't know what it is.


```shell
npm install grunt-poeditor-gd --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-poeditor-gd');
```

or using the very convenient [load-grunt-tasks](https://github.com/sindresorhus/load-grunt-tasks) utility.

## Usage

**This a non-tested plugin, use at your own risk.**
On the other, it's only a convenient plugin, just take care of the downloaded exports.

### Example

```js
grunt.initConfig({
  poeditor: {
    target1: {
      command: { // POEditor's API args
        action: 'list_languages',
        id: '9999'
      }
    },
    target2: {
      upload: { // special case for uploads
        id: '<%= poeditor.options.project_id %>',
        updating: 'terms_definitions',
        overwrite: 1, // set any POE's API option
        sync_terms: 1,
        intervalSecs: 5 // interval between uploads
        // (to avoid "Too many upload in a short period of time" API error)
      }
    },
    target3: {
      download: {
        project_id: '<%= poeditor.options.project_id %>',
        type: 'po', // export type (check out the doc)
        filters: ["proofread", "translated"], // https://poeditor.com/api_reference/#export
        tags: ["myTag", "myOtherTag"], // https://poeditor.com/api_reference/#export
        dest: '<%= conf.front %>/locale/?/LC_MESSAGES/django.po'
        // grunt style dest files
      }
    },
    options: {
      project_id: '1234',
      // matching POEditor's language codes with yours
      // applies to uploads & downloads
      languages: {
        'en-us': 'en',
        'es': 'es',
        'es-ar': 'es_AR',
        'fr': 'fr'
      },
      api_token: '[your API token here]'
    }
  },
});
```

### Options

#### command
An object specifying the API command.
Check out the doc : https://poeditor.com/api_reference/.

#### upload
Check out the doc, at the Upload command.
https://poeditor.com/api_reference/#upload

#### download
Check out the doc too, at the Export command.
https://poeditor.com/api_reference/#export
Export type = po, pot, mo, xls, apple_strings, android_strings, resx, resw, properties, or json.

## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).

## Release History

- 0.1.9 added export settings support
- 0.1.7~8 added upload feature
- 0.1.0~6 initial (non-tested) releases

## License
MIT License, see LICENSE-MIT for details.

---
_Source: https://npm.io/package/grunt-poeditor-gd · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
