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
Metadata
Release files for txt2tmx 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| txt2tmx-1.0.0.tar.gz | 4.7 kB | Without provenance | Details for txt2tmx-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| txt2tmx-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for txt2tmx-1.0.0-py3-none-any.whl |
Total release size: 10.0 kB
Release files / txt2tmx-1.0.0.tar.gz
| Download URL | txt2tmx-1.0.0.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75ba6978391138ad371a061f995e7ec61dcefaa0fa7f96ccc3c28f32383d6668
|
|
BLAKE2b-256 checksum How to use checksums |
cc379b1ae9e037044048c2bcbb6bb8fd0bd9ed0ee6990e5b673027dc4a54f9dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / txt2tmx-1.0.0-py3-none-any.whl
| Download URL | txt2tmx-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0a1f20cc6c45fd034f37a8e168a09141aea26c8f607cb353c71b83b21fbbe960
|
|
BLAKE2b-256 checksum How to use checksums |
092d0a6e7132526c44307285e1558a20803b9ac4dc7f4d0ef30e9700191e42ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for txt2tmx 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.