@patterkit/cli 0.12.1 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +9 -4
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -34,6 +34,7 @@ import {
|
|
|
34
34
|
CONFLICT_SIDECAR,
|
|
35
35
|
extractLoc,
|
|
36
36
|
applyLoc,
|
|
37
|
+
describeLocExport,
|
|
37
38
|
catalogToJson,
|
|
38
39
|
jsonToCatalog,
|
|
39
40
|
catalogToPo,
|
|
@@ -66,7 +67,7 @@ import { writeTextFiles, writeBinaryFile, currentUser } from "@wildwinter/simple
|
|
|
66
67
|
// package.json
|
|
67
68
|
var package_default = {
|
|
68
69
|
name: "@patterkit/cli",
|
|
69
|
-
version: "0.
|
|
70
|
+
version: "0.13.0",
|
|
70
71
|
description: "The `patter` CLI: validate, format, export, play, test coverage, localise, and merge Patter projects.",
|
|
71
72
|
type: "module",
|
|
72
73
|
license: "MIT",
|
|
@@ -95,8 +96,8 @@ var package_default = {
|
|
|
95
96
|
"build:standalone:others": "node scripts/build-standalone.mjs --targets=linux-x64,linux-arm64,windows-x64"
|
|
96
97
|
},
|
|
97
98
|
dependencies: {
|
|
98
|
-
"@patterkit/core": "0.9.
|
|
99
|
-
"@patterkit/ops": "0.
|
|
99
|
+
"@patterkit/core": "0.9.2",
|
|
100
|
+
"@patterkit/ops": "0.21.0",
|
|
100
101
|
"@wildwinter/simple-vc-lib": "^0.5.2"
|
|
101
102
|
}
|
|
102
103
|
};
|
|
@@ -193,7 +194,7 @@ Usage:
|
|
|
193
194
|
patter loc-import <file> [path] Import translated strings back into the project
|
|
194
195
|
[--locale xx] (format by extension; --locale overrides the file's)
|
|
195
196
|
patter export-script [path] [-o file.pdf|.docx] Readable screenplay of the script + flow
|
|
196
|
-
(dialogue,
|
|
197
|
+
(dialogue, text, choices, jumps). Format from the extension; default
|
|
197
198
|
beside the bundle, as .pdf. The PDF embeds its fonts and covers any script or emoji.
|
|
198
199
|
patter voice-export [path] -o file.xlsx The voice (VO) recording script
|
|
199
200
|
[--all] Include every voiced line (else only "ready to record")
|
|
@@ -615,6 +616,7 @@ ${count} issue(s)${advisory}`);
|
|
|
615
616
|
const loaded = loadProject(positionals[0] ?? ".");
|
|
616
617
|
const locale = typeof flags.locale === "string" ? flags.locale : void 0;
|
|
617
618
|
const catalog = extractLoc(loaded, { locale });
|
|
619
|
+
const changes = describeLocExport(loaded, { locale });
|
|
618
620
|
if (format === "xlsx") {
|
|
619
621
|
if (flags.o === "-") return usage("loc-export", "-o - is not supported for --format xlsx: a spreadsheet is not text");
|
|
620
622
|
if (!commitBinary(flags.o, await catalogToXlsx(catalog))) return 1;
|
|
@@ -622,12 +624,14 @@ ${count} issue(s)${advisory}`);
|
|
|
622
624
|
const content = format === "json" ? catalogToJson(catalog) : catalogToPo(catalog);
|
|
623
625
|
if (flags.o === "-") {
|
|
624
626
|
process.stdout.write(content);
|
|
627
|
+
for (const l of changes) console.error(l);
|
|
625
628
|
return 0;
|
|
626
629
|
}
|
|
627
630
|
if (!commitWrites([{ path: flags.o, content }])) return 1;
|
|
628
631
|
}
|
|
629
632
|
const n = catalog.entries.length;
|
|
630
633
|
console.log(`wrote ${flags.o} - ${n} string(s)${locale ? `, ${locale}` : " (template)"}`);
|
|
634
|
+
for (const l of changes) console.log(l);
|
|
631
635
|
return 0;
|
|
632
636
|
}
|
|
633
637
|
case "export-script": {
|
|
@@ -747,6 +751,7 @@ ${count} issue(s)${advisory}`);
|
|
|
747
751
|
}
|
|
748
752
|
if (!commitWrites(writes)) return 1;
|
|
749
753
|
console.log(`imported ${stats.updated} string(s) for ${locale} across ${stats.files} scene(s)`);
|
|
754
|
+
if (stats.dropped) console.log(`dropped ${stats.dropped} translation(s) of action text, which isn't localised while "Localise text lines in dialogue scenes" (localiseDialogueText) is off`);
|
|
750
755
|
return 0;
|
|
751
756
|
}
|
|
752
757
|
case "share-scopes": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patterkit/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "The `patter` CLI: validate, format, export, play, test coverage, localise, and merge Patter projects.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"build:standalone:others": "node scripts/build-standalone.mjs --targets=linux-x64,linux-arm64,windows-x64"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@patterkit/core": "0.9.
|
|
33
|
-
"@patterkit/ops": "0.
|
|
32
|
+
"@patterkit/core": "0.9.2",
|
|
33
|
+
"@patterkit/ops": "0.21.0",
|
|
34
34
|
"@wildwinter/simple-vc-lib": "^0.5.2"
|
|
35
35
|
}
|
|
36
36
|
}
|