Skip to main content

Txt-to-tmx file converter.

Project description

This script creates a line-to-line aligned tmx file

It accepts either two sentence-segmented txt files, with one sentence per line in each file, or one txt file with two tab-delimited elements per line. Based on that, the script creates a tmx file in the same location as the original file(s).

In case of a single tab-delimited file it must have the following format: 'Original-text Tab-char Translation' per each line.

You must also pass as the first argument the desired language codes as follows: -c en-US#ar-SA; -c EN#RU, etc.

The default language codes are en-US and ru-RU

How to install on Windows (no admin rights required)

Step 1. Get Python 3 from Microsoft Store

Step 2. Get PowerShell from Microsoft Store

Step 3. Create a new folder in your file system on Windows

Step 4. Right-click on that folder and select Open in Terminal

Step 5. Write the following in the command line of the open Terminal window:

> python3 -m venv .venv
> .\.venv\Scripts\Activate.ps1
> python3 -m pip install txt2tmx

How to use

If you've just finished the installation, type in in the command line (for a single source file):

> python3 -m txt2tmx -c en#ar C:\full-path\your-file.txt

Or, in case of two source files:

> python3 -m txt2tmx -c en#ar C:\full-path\file_1.txt C:\full-path\file_2.txt 

If you already closed PowerShell, use Windows Explorer to find the folder that you created in Step 3 (or simply repeat Steps 3 to 5 if you can't find it). Open that folder in PowerShell Terminal. Then type in the following commands in the PowerShell window:

> .\.venv\Scripts\Activate.ps1
> python3 -m txt2tmx -c en#ar C:\full-path\your-file.txt

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

txt2tmx-1.0.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

txt2tmx-1.0.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file txt2tmx-1.0.0.tar.gz.

File metadata

  • Download URL: txt2tmx-1.0.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.18 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.4

File hashes

Hashes for txt2tmx-1.0.0.tar.gz
Algorithm Hash digest
SHA256 75ba6978391138ad371a061f995e7ec61dcefaa0fa7f96ccc3c28f32383d6668
MD5 722fdcc304a97c59f262cf9793121f8b
BLAKE2b-256 cc379b1ae9e037044048c2bcbb6bb8fd0bd9ed0ee6990e5b673027dc4a54f9dd

See more details on using hashes here.

File details

Details for the file txt2tmx-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: txt2tmx-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.18 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.4

File hashes

Hashes for txt2tmx-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a1f20cc6c45fd034f37a8e168a09141aea26c8f607cb353c71b83b21fbbe960
MD5 8e63ce400d69431a70b927975c42e4dc
BLAKE2b-256 092d0a6e7132526c44307285e1558a20803b9ac4dc7f4d0ef30e9700191e42ea

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