diff --git a/omegat_tools/README.md b/omegat_tools/README.md new file mode 100644 index 0000000..57cdbf0 --- /dev/null +++ b/omegat_tools/README.md @@ -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.