mirror of
https://codeberg.org/kazephil/Little_CAT_Helpers.git
synced 2023-08-25 14:05:45 +02:00
Add omegat-tools README with description of first script.
This commit is contained in:
parent
df71769df2
commit
94d90d491e
35
omegat_tools/README.md
Normal file
35
omegat_tools/README.md
Normal file
@ -0,0 +1,35 @@
|
||||
# Little Tools for Working with OmegaT
|
||||
|
||||
The scripts in this directory are described below.
|
||||
|
||||
# Collect OmegaT Project Data
|
||||
|
||||
## Overview
|
||||
|
||||
This script finds all OmegaT projects in a user-specified folder and its subfolders, and copies the default main memory ("project_save.tmx") and glossary ("glossary.txt") files to a destination folder selected by the user. The copying operation creates a subfolder for each project in that destination folder, renames both the memory and glossary files to match the project name, and copies then to the corresponding subfolder.
|
||||
|
||||
The original idea for the script came when my workplaced imposed a switch from OmegaT to a different CAT tool, and we were told to copy our existing memories and glossaries to a shared network folder.
|
||||
|
||||
The idea of manually going through various folders and subfolders, renaming each "project_save.tmx" and "glossary.txt" file to something more meaningful, and copying them to the shared folder was distinctively unappealing.
|
||||
|
||||
I managed to write an ugly, but functional script that did the bulk of the work. The script here is a rewrite based on the original idea.
|
||||
|
||||
## Usage and Requirements
|
||||
|
||||
Simply run the program from the command line or your favourite IDE. Select the folder from which you want to copy OmegaT project memories and glossaries the first time a dialog pops up. In the second dialog select the destination folder. The name of the file being copied is output to the console while the script is running.
|
||||
|
||||
The script relies on the `pathlib` module and should, in principle, work on Python 3.4 or later but has only been run under Python 3.10.
|
||||
|
||||
## Limitations
|
||||
|
||||
1. The default OmegaT project subfolder hierarchy is assumed. Projects in which the names or locations of the subfolders in the OmegaT project hierarchy will not be recognized.
|
||||
2. Glossaries other than the default "glossary.txt" file are not recognized or copied.
|
||||
3. The destination folder for the files must be exist before the script is run because the folder selection dialog does not offer an option to create a new directory.
|
||||
|
||||
## Possible Improvements
|
||||
|
||||
Since I currently only use OmegaT on occasion for personal projects, progress on improvements is likely to be slow, but listing them here will ensure the ideas are not forgotten.
|
||||
|
||||
1. Copy other reference glossaries in addition to the default glossary file.
|
||||
2. Accommodate user-defined project structures directory names, and choice of files to copy.
|
||||
3. Allow users to create the destination directory from the folder selection dialog.
|
Loading…
Reference in New Issue
Block a user