# 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
```
Raw data
{
"_id": null,
"home_page": "https://github.com/AlexSkrn/txt2tmx",
"name": "txt2tmx",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6.0",
"maintainer_email": "",
"keywords": "txt-to-tmx converter,line-to-line alignment",
"author": "AlexSkrn",
"author_email": "alex.g.skrn@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/cc/37/9b1ae9e037044048c2bcbb6bb8fd0bd9ed0ee6990e5b673027dc4a54f9dd/txt2tmx-1.0.0.tar.gz",
"platform": null,
"description": "\n# This script creates a line-to-line aligned tmx file\n\nIt accepts either two sentence-segmented txt files, with one sentence per line in\neach file, or one txt file with two tab-delimited elements per line. \nBased on that, the script creates a tmx file in the same location as the original file(s).\n\nIn case of a single tab-delimited file it must have the following format: \n'Original-text Tab-char Translation' per each line.\n\nYou must also pass as the first argument the desired language codes as follows:\n-c en-US#ar-SA; -c EN#RU, etc.\n\nThe default language codes are en-US and ru-RU\n\n## How to install on Windows (no admin rights required)\n\nStep 1. Get Python 3 from Microsoft Store\n\nStep 2. Get PowerShell from Microsoft Store\n\nStep 3. Create a new folder in your file system on Windows\n\nStep 4. Right-click on that folder and select Open in Terminal\n\nStep 5. Write the following in the command line of the open Terminal window:\n```\n> python3 -m venv .venv\n> .\\.venv\\Scripts\\Activate.ps1\n> python3 -m pip install txt2tmx\n```\n\n## How to use\n\nIf you've just finished the installation, type in in the command line (for\na single source file):\n```\n> python3 -m txt2tmx -c en#ar C:\\full-path\\your-file.txt\n```\n\nOr, in case of two source files:\n```\n> python3 -m txt2tmx -c en#ar C:\\full-path\\file_1.txt C:\\full-path\\file_2.txt \n```\n\nIf 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:\n```\n> .\\.venv\\Scripts\\Activate.ps1\n> python3 -m txt2tmx -c en#ar C:\\full-path\\your-file.txt\n```\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Txt-to-tmx file converter.",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/AlexSkrn/txt2tmx"
},
"split_keywords": [
"txt-to-tmx converter",
"line-to-line alignment"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "092d0a6e7132526c44307285e1558a20803b9ac4dc7f4d0ef30e9700191e42ea",
"md5": "8e63ce400d69431a70b927975c42e4dc",
"sha256": "0a1f20cc6c45fd034f37a8e168a09141aea26c8f607cb353c71b83b21fbbe960"
},
"downloads": -1,
"filename": "txt2tmx-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8e63ce400d69431a70b927975c42e4dc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6.0",
"size": 5336,
"upload_time": "2024-01-01T17:02:54",
"upload_time_iso_8601": "2024-01-01T17:02:54.389033Z",
"url": "https://files.pythonhosted.org/packages/09/2d/0a6e7132526c44307285e1558a20803b9ac4dc7f4d0ef30e9700191e42ea/txt2tmx-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "cc379b1ae9e037044048c2bcbb6bb8fd0bd9ed0ee6990e5b673027dc4a54f9dd",
"md5": "722fdcc304a97c59f262cf9793121f8b",
"sha256": "75ba6978391138ad371a061f995e7ec61dcefaa0fa7f96ccc3c28f32383d6668"
},
"downloads": -1,
"filename": "txt2tmx-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "722fdcc304a97c59f262cf9793121f8b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6.0",
"size": 4674,
"upload_time": "2024-01-01T17:02:56",
"upload_time_iso_8601": "2024-01-01T17:02:56.141590Z",
"url": "https://files.pythonhosted.org/packages/cc/37/9b1ae9e037044048c2bcbb6bb8fd0bd9ed0ee6990e5b673027dc4a54f9dd/txt2tmx-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-01 17:02:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "AlexSkrn",
"github_project": "txt2tmx",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "txt2tmx"
}