@mdgf11/filesystem-lib 2.2.14 → 2.2.15
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PartialJurisprudenciaDocument } from "@stjiris/jurisprudencia-document";
|
|
1
|
+
import { JurisprudenciaDocument, PartialJurisprudenciaDocument } from "@stjiris/jurisprudencia-document";
|
|
2
2
|
import { ContentType, FilesystemDocument } from "./types.js";
|
|
3
3
|
export declare function writeFilesystemDocument(filesystem_document: FilesystemDocument): void;
|
|
4
4
|
export declare function loadFilesystemDocument(jsonPath: string): FilesystemDocument;
|
|
5
|
-
export declare function loadNlpDocument(
|
|
5
|
+
export declare function loadNlpDocument(jurisprudencia_document: JurisprudenciaDocument): string;
|
|
6
6
|
export declare function hasSelectableText(buffer: Buffer): Promise<boolean>;
|
|
7
7
|
export declare function generateFilePath(jurisprudencia_document: PartialJurisprudenciaDocument): string;
|
|
8
8
|
export declare function extractContent(contents: ContentType[]): Promise<string[]>;
|
|
@@ -54,8 +54,8 @@ export function loadFilesystemDocument(jsonPath) {
|
|
|
54
54
|
}))
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
export function loadNlpDocument(
|
|
58
|
-
return fs.readFileSync(
|
|
57
|
+
export function loadNlpDocument(jurisprudencia_document) {
|
|
58
|
+
return fs.readFileSync(`${generateFilePath(jurisprudencia_document)}/${ORIGINAL_NAME}.json`, 'utf-8');
|
|
59
59
|
}
|
|
60
60
|
export async function hasSelectableText(buffer) {
|
|
61
61
|
try {
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PartialJurisprudenciaDocument } from "@stjiris/jurisprudencia-document";
|
|
1
|
+
import { JurisprudenciaDocument, PartialJurisprudenciaDocument } from "@stjiris/jurisprudencia-document";
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
import mammoth from "mammoth";
|
|
4
4
|
import { ContentType, Date_Area_Section, DETAILS_NAME, FILESYSTEM_PATH, FilesystemDocument, ORIGINAL_NAME, Retrievable_Metadata, ROOT_PATH, SHAREPOINT_COPY_PATH, Sharepoint_Metadata, SupportedUpdateSources } from "./types.js";
|
|
@@ -63,8 +63,10 @@ export function loadFilesystemDocument(jsonPath: string): FilesystemDocument {
|
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
export function loadNlpDocument(
|
|
67
|
-
|
|
66
|
+
export function loadNlpDocument(jurisprudencia_document: JurisprudenciaDocument): string {
|
|
67
|
+
|
|
68
|
+
return fs.readFileSync(`${generateFilePath(jurisprudencia_document)}/${ORIGINAL_NAME}.json`, 'utf-8');
|
|
69
|
+
|
|
68
70
|
}
|
|
69
71
|
|
|
70
72
|
export async function hasSelectableText(buffer: Buffer): Promise<boolean> {
|