Skip to main content

Command line client for POEditor service

Project description

POEditor sync

Tests poeditor-sync

A commandline tool for synchronizing your project's translation with POEditor.

The script uses Click library to wrap POEditor API client into a commandline tool that can be used manually or inside shell scripts.

Installation

pip install poeditor-sync

Usage

Configuration

Create a config file poeditor.yml to link your project with a POEditor project and define paths to translation files. Multiple projects are supported.

api_token: ABC123...
projects:
  - id: 12345
    format: po
    # set it to terms to order results by 'terms' alphabetically.
    order: terms
    # generic path to translation file
    terms_path: locale/{language_code}/LC_MESSAGES/django.po
    # alternatively, specify per-language path
    terms:
      en: locale/en/LC_MESSAGES/django.po
      pl: locale/pl/LC_MESSAGES/django.po
  - id: 54321
    format: po
    terms_path: locale/{language_code}/LC_MESSAGES/djangojs.po
    terms:
      en: locale/en/LC_MESSAGES/djangojs.po
      pl: locale/pl/LC_MESSAGES/djangojs.po

If you're planning to commit the config file into your repository or share it with someone, it is recommend that the API token in your config file be a read-only token. You can use a separate token for uploads and pass it using --token option or POEDITOR_TOKEN environment variable.

Commands:

# View usage instructions
poeditor --help
# generate config file
poeditor init {project-id}
# List projects and their translation languages
poeditor project-details
# download translations
poeditor pull
# Upload local translations to poeditor
poeditur push
# Upload only one language and user a different API token:
poeditur --language pl --token=123ABCD push
# Upload only terms (after adding new strings to the project)
poeditor push-terms --sync-terms --overwrite

Options

Option environment variable default value description
--token POEDITOR_TOKEN api_token from config file Authentication token for POEditor. Overrides value from config file.
--config-file POEDITOR_CONFIG_FILE poeditor.yml Path to the project config file in yaml format
--language POEDITOR_LANGUAGE Operate only on this language

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

poeditor-sync-0.6.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

poeditor_sync-0.6-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file poeditor-sync-0.6.tar.gz.

File metadata

  • Download URL: poeditor-sync-0.6.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.17

File hashes

Hashes for poeditor-sync-0.6.tar.gz
Algorithm Hash digest
SHA256 e20168e8b4008b605eccc006ab3b47fdc291a8bf2a30a4f13e2c59c47427899a
MD5 ea99d68ad10ab5e5086093af73692d35
BLAKE2b-256 5870dcbb90f715ff9d7d57ebcc467f57ffa3410a71cb863279fbb9afde5e10a7

See more details on using hashes here.

File details

Details for the file poeditor_sync-0.6-py3-none-any.whl.

File metadata

  • Download URL: poeditor_sync-0.6-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.17

File hashes

Hashes for poeditor_sync-0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8a30334377dfc90d7e76302ea29ed47134ad64a30902dd48a0afcaa60c07883d
MD5 68a8de24ac2b25403f27c4cc5108525d
BLAKE2b-256 36a1b003e4a1a970c0e4f501f027c30e30c475e5252d8a795eb754b517a799b9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page