@clazic/kordoc 2.4.5 → 2.4.7
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/{batch-provider-PNDCSGQW.js → batch-provider-XI2EPODC.js} +9 -3
- package/dist/batch-provider-XI2EPODC.js.map +1 -0
- package/dist/{chunk-CG3DV7QG.js → chunk-5DD75UUX.js} +2 -2
- package/dist/{chunk-ATB6T3SG.js → chunk-GITPGCCA.js} +4 -3
- package/dist/chunk-GITPGCCA.js.map +1 -0
- package/dist/cli.js +5 -5
- package/dist/index.cjs +9 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +2 -2
- package/dist/{resolve-TZVGVOVD.js → resolve-SUU5Q6DJ.js} +3 -3
- package/dist/{utils-LG2ALGSE.js → utils-7LOIY3O6.js} +2 -2
- package/dist/{watch-Z3CENX4H.js → watch-HUIKUPMG.js} +3 -3
- package/package.json +1 -1
- package/dist/batch-provider-PNDCSGQW.js.map +0 -1
- package/dist/chunk-ATB6T3SG.js.map +0 -1
- /package/dist/{chunk-CG3DV7QG.js.map → chunk-5DD75UUX.js.map} +0 -0
- /package/dist/{resolve-TZVGVOVD.js.map → resolve-SUU5Q6DJ.js.map} +0 -0
- /package/dist/{utils-LG2ALGSE.js.map → utils-7LOIY3O6.js.map} +0 -0
- /package/dist/{watch-Z3CENX4H.js.map → watch-HUIKUPMG.js.map} +0 -0
package/dist/cli.js
CHANGED
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
markdownToHwpx,
|
|
5
5
|
markdownToXlsx,
|
|
6
6
|
parse
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GITPGCCA.js";
|
|
8
8
|
import "./chunk-4PP34NVQ.js";
|
|
9
9
|
import {
|
|
10
10
|
VERSION,
|
|
11
11
|
toArrayBuffer
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5DD75UUX.js";
|
|
13
13
|
import "./chunk-MOL7MDBG.js";
|
|
14
14
|
import "./chunk-7FMKAV4P.js";
|
|
15
15
|
import "./chunk-JOGAFNIL.js";
|
|
@@ -137,7 +137,7 @@ async function runParse(files, opts) {
|
|
|
137
137
|
saveImages(absPath);
|
|
138
138
|
}
|
|
139
139
|
} catch (err) {
|
|
140
|
-
const { sanitizeError } = await import("./utils-
|
|
140
|
+
const { sanitizeError } = await import("./utils-7LOIY3O6.js");
|
|
141
141
|
process.stderr.write(`
|
|
142
142
|
[kordoc] ERROR: ${fileName} \u2014 ${sanitizeError(err)}
|
|
143
143
|
`);
|
|
@@ -221,7 +221,7 @@ program.command("convert <input>").description("\uB9C8\uD06C\uB2E4\uC6B4 \uD30C\
|
|
|
221
221
|
`));
|
|
222
222
|
}
|
|
223
223
|
} catch (err) {
|
|
224
|
-
const { sanitizeError } = await import("./utils-
|
|
224
|
+
const { sanitizeError } = await import("./utils-7LOIY3O6.js");
|
|
225
225
|
process.stderr.write(` FAIL
|
|
226
226
|
`);
|
|
227
227
|
process.stderr.write(` \u2192 ${sanitizeError(err)}
|
|
@@ -230,7 +230,7 @@ program.command("convert <input>").description("\uB9C8\uD06C\uB2E4\uC6B4 \uD30C\
|
|
|
230
230
|
}
|
|
231
231
|
});
|
|
232
232
|
program.command("watch <dir>").description("\uB514\uB809\uD1A0\uB9AC \uAC10\uC2DC \u2014 \uC0C8 \uBB38\uC11C \uC790\uB3D9 \uBCC0\uD658").option("--webhook <url>", "\uACB0\uACFC \uC804\uC1A1 \uC6F9\uD6C5 URL").option("-d, --out-dir <dir>", "\uBCC0\uD658 \uACB0\uACFC \uCD9C\uB825 \uB514\uB809\uD1A0\uB9AC").option("-p, --pages <range>", "\uD398\uC774\uC9C0/\uC139\uC158 \uBC94\uC704").option("--format <type>", "\uCD9C\uB825 \uD615\uC2DD: markdown \uB610\uB294 json", "markdown").option("--silent", "\uC9C4\uD589 \uBA54\uC2DC\uC9C0 \uC228\uAE30\uAE30").action(async (dir, opts) => {
|
|
233
|
-
const { watchDirectory } = await import("./watch-
|
|
233
|
+
const { watchDirectory } = await import("./watch-HUIKUPMG.js");
|
|
234
234
|
await watchDirectory({
|
|
235
235
|
dir,
|
|
236
236
|
outDir: opts.outDir,
|
package/dist/index.cjs
CHANGED
|
@@ -2244,8 +2244,14 @@ __export(batch_provider_exports, {
|
|
|
2244
2244
|
});
|
|
2245
2245
|
function getBatchTempDir() {
|
|
2246
2246
|
if (!_batchTempDir) {
|
|
2247
|
-
_batchTempDir = (0, import_path2.join)(process.cwd(), "
|
|
2247
|
+
_batchTempDir = (0, import_path2.join)(process.cwd(), ".kordoc_ocr_tmp");
|
|
2248
2248
|
(0, import_fs2.mkdirSync)(_batchTempDir, { recursive: true });
|
|
2249
|
+
if (process.platform === "win32") {
|
|
2250
|
+
try {
|
|
2251
|
+
(0, import_child_process3.execSync)(`attrib +h "${_batchTempDir}"`, { stdio: "ignore" });
|
|
2252
|
+
} catch {
|
|
2253
|
+
}
|
|
2254
|
+
}
|
|
2249
2255
|
}
|
|
2250
2256
|
return _batchTempDir;
|
|
2251
2257
|
}
|
|
@@ -2840,7 +2846,7 @@ var import_jszip2 = __toESM(require("jszip"), 1);
|
|
|
2840
2846
|
var import_xmldom = require("@xmldom/xmldom");
|
|
2841
2847
|
|
|
2842
2848
|
// src/utils.ts
|
|
2843
|
-
var VERSION = true ? "2.4.
|
|
2849
|
+
var VERSION = true ? "2.4.7" : "0.0.0-dev";
|
|
2844
2850
|
function toArrayBuffer(buf) {
|
|
2845
2851
|
if (buf.byteOffset === 0 && buf.byteLength === buf.buffer.byteLength) {
|
|
2846
2852
|
return buf.buffer;
|
|
@@ -6446,6 +6452,7 @@ async function parsePdfDocument(buffer, options) {
|
|
|
6446
6452
|
} catch {
|
|
6447
6453
|
}
|
|
6448
6454
|
}
|
|
6455
|
+
allOcrBlocks.sort((a, b) => (a.pageNumber ?? 0) - (b.pageNumber ?? 0));
|
|
6449
6456
|
ocrBlocks = allOcrBlocks;
|
|
6450
6457
|
} else {
|
|
6451
6458
|
try {
|