kapi tm import-dir
kapi import-dir [directory]Walk a directory and import every matching TMX file into the TM.
Auto-detects plain .tmx and gzipped .tmx.gz files. The filename (without path) becomes the Origin.Key on each imported entry so you can trace which file a segment came from.
By default, imports entries matching --source-locale and --target-locale from every file. Use --pattern to filter (glob against filename) and --all-pairs to emit the full language cross-product from multilingual files.
Examples: kapi tm import-dir ./tmx --name corpus --source-locale en --target-locale nb --pattern "en-nb" kapi tm import-dir ./eurlex --name corpus --all-pairs --locales en-GB,fr-FR,de-DE
Runs in your browser against a small sample file. Edit the command before running, or press Run to execute it as shown.
kapi tm import-dir| Flag | Type | Default | Description |
|---|---|---|---|
| --all-pairs | bool | false | emit entries for every (src,tgt) pair present in each TU |
| --file | string | explicit path to resource file | |
| --local | bool | false | use resource in current directory |
| --locales | string | comma-separated locale subset for --all-pairs | |
| --name | string | named resource in KAPI_HOME (e.g. --name project-terms) | |
| --pattern, -p | string | filename glob to filter (default: all .tmx and .tmx.gz) | |
| --recursive, -r | bool | false | recurse into subdirectories |
| --source-locale, -s | string | en | source locale |
| --target-locale, -t | string | target locale |
← Back to the Command Reference