Gå til hovedinnhold

kapi extract

kapi extract

Send ut tospråklige XLIFF 2.x-filer (standard) eller PO-filer for hvert målspråk deklarert i et kapi-prosjekt, forhåndsutfylt fra prosjektets innholdsminne.

Hver kjøring skriver én batch med utdata under .kapi/work/cache/extractions/<batch-id>/ pluss én tospråklig fil per kilde → målpar i --out-dir (standard "out/").

Commandextract
Groupadvanced
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 extract -p kapi.yaml --no-memory
Flags
FlagTypeDefaultDescription
--force boolfalsere-extract every file, ignoring the incremental reuse of unchanged sources
--format stringxliff2bilingual output format (xliff2 | po | kpz)
--no-memory boolfalseskip content-memory pre-fill on extract
--only stringrestrict to a single content collection by name
--out stringmerge-time output layout recorded in the .kpz (e.g. 'translated/{lang}/{name}.{ext}')
--out-dir stringoutdirectory for emitted bilingual files (relative to project)
--output , -ostringwrite an ad-hoc .kpz workspace from the given source files
--pattern stringextra glob pattern restricting which source files to include
--progress stringstream progress events to stderr as NDJSON (value: jsonl); events use the flow-run event vocabulary
--project , -pstringpath to a kapi.yaml project recipe or its directory (auto-discovered from cwd if omitted)
--redact boolfalsereplace sensitive content with placeholders; originals stay in a local vault for merge
--redact-rules stringpath to a redaction rules YAML file (implies --redact)
--target-lang stringcomma-separated target locales (default: all in recipe)
--with-source boolfalseembed raw source bytes in the .kpz (default: identity + skeleton only)
--xliff-version stringXLIFF 2.x version to emit (2.0, 2.1, 2.2; default 2.2)
More examples
kapi extract -p kapi.yaml --target-lang fr
kapi extract -p kapi.yaml --target-lang fr,de,es
kapi extract src/*.json -o work.kpz --target-lang fr,qps # ad-hoc .kpz workspace

← Back to the Command Reference