Gå til hovedinnhold

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

Commandtm import-dir
Try it

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
Flags
FlagTypeDefaultDescription
--all-pairsboolfalseemit entries for every (src,tgt) pair present in each TU
--filestringexplicit path to resource file
--localboolfalseuse resource in current directory
--localesstringcomma-separated locale subset for --all-pairs
--namestringnamed resource in KAPI_HOME (e.g. --name project-terms)
--pattern, -pstringfilename glob to filter (default: all .tmx and .tmx.gz)
--recursive, -rboolfalserecurse into subdirectories
--source-locale, -sstringensource locale
--target-locale, -tstringtarget locale

← Back to the Command Reference