officeparser 3.2.0 → 3.2.2
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/officeParser.js +5 -5
- package/package.json +2 -2
- package/typings/officeParser.d.ts +10 -22
package/officeParser.js
CHANGED
|
@@ -506,7 +506,7 @@ function disableConsoleOutput() {
|
|
|
506
506
|
/** Async function that can be used with await to execute parseWord. Or it can be used with promises.
|
|
507
507
|
* @param {string} filename File path
|
|
508
508
|
* @param {boolean} [deleteOfficeDist=true] Optional: Delete the officeDist directory created while unarchiving the doc file to get its content underneath. By default, we delete those files after we are done reading them.
|
|
509
|
-
* @returns {
|
|
509
|
+
* @returns {Promise<string>}
|
|
510
510
|
*/
|
|
511
511
|
var parseWordAsync = function (filename, deleteOfficeDist = true) {
|
|
512
512
|
return new Promise((resolve, reject) => {
|
|
@@ -526,7 +526,7 @@ var parseWordAsync = function (filename, deleteOfficeDist = true) {
|
|
|
526
526
|
/** Async function that can be used with await to execute parsePowerPoint. Or it can be used with promises.
|
|
527
527
|
* @param {string} filename File path
|
|
528
528
|
* @param {boolean} [deleteOfficeDist=true] Optional: Delete the officeDist directory created while unarchiving the doc file to get its content underneath. By default, we delete those files after we are done reading them.
|
|
529
|
-
* @returns {
|
|
529
|
+
* @returns {Promise<string>}
|
|
530
530
|
*/
|
|
531
531
|
var parsePowerPointAsync = function (filename, deleteOfficeDist = true) {
|
|
532
532
|
return new Promise((resolve, reject) => {
|
|
@@ -546,7 +546,7 @@ var parsePowerPointAsync = function (filename, deleteOfficeDist = true) {
|
|
|
546
546
|
/** Async function that can be used with await to execute parseExcel. Or it can be used with promises.
|
|
547
547
|
* @param {string} filename File path
|
|
548
548
|
* @param {boolean} [deleteOfficeDist=true] Optional: Delete the officeDist directory created while unarchiving the doc file to get its content underneath. By default, we delete those files after we are done reading them.
|
|
549
|
-
* @returns {
|
|
549
|
+
* @returns {Promise<string>}
|
|
550
550
|
*/
|
|
551
551
|
var parseExcelAsync = function (filename, deleteOfficeDist = true) {
|
|
552
552
|
return new Promise((resolve, reject) => {
|
|
@@ -566,7 +566,7 @@ var parseExcelAsync = function (filename, deleteOfficeDist = true) {
|
|
|
566
566
|
/** Async function that can be used with await to execute parseOpenOffice. Or it can be used with promises.
|
|
567
567
|
* @param {string} filename File path
|
|
568
568
|
* @param {boolean} [deleteOfficeDist=true] Optional: Delete the officeDist directory created while unarchiving the doc file to get its content underneath. By default, we delete those files after we are done reading them.
|
|
569
|
-
* @returns {
|
|
569
|
+
* @returns {Promise<string>}
|
|
570
570
|
*/
|
|
571
571
|
var parseOpenOfficeAsync = function (filename, deleteOfficeDist = true) {
|
|
572
572
|
return new Promise((resolve, reject) => {
|
|
@@ -587,7 +587,7 @@ var parseOpenOfficeAsync = function (filename, deleteOfficeDist = true) {
|
|
|
587
587
|
* Main async function that can be used with await to execute parseOffice. Or it can be used with promises.
|
|
588
588
|
* @param {string} filename File path
|
|
589
589
|
* @param {boolean} [deleteOfficeDist=true] Optional: Delete the officeDist directory created while unarchiving the doc file to get its content underneath. By default, we delete those files after we are done reading them.
|
|
590
|
-
* @returns {
|
|
590
|
+
* @returns {Promise<string>}
|
|
591
591
|
*/
|
|
592
592
|
var parseOfficeAsync = function (filename, deleteOfficeDist = true) {
|
|
593
593
|
return new Promise((resolve, reject) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "officeparser",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2",
|
|
4
4
|
"description": "A Node.js library to parse text out of any office file. Currently supports docx, pptx, xlsx, odt, odp and ods files.",
|
|
5
5
|
"main": "officeParser.js",
|
|
6
6
|
"files": [
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"decompress": "^4.2.0",
|
|
45
45
|
"rimraf": "^2.6.3",
|
|
46
|
-
"xml2js": "^0.
|
|
46
|
+
"xml2js": "^0.5.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"typescript": "^5.0.3"
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* @returns {void}
|
|
7
7
|
*/
|
|
8
8
|
export function parseWord(filename: string, callback: Function, deleteOfficeDist?: boolean): void;
|
|
9
|
-
|
|
10
9
|
/** Main function for parsing text from PowerPoint files
|
|
11
10
|
* @param {string} filename File path
|
|
12
11
|
* @param {function} callback Callback function that returns value or error
|
|
@@ -14,7 +13,6 @@ export function parseWord(filename: string, callback: Function, deleteOfficeDist
|
|
|
14
13
|
* @returns {void}
|
|
15
14
|
*/
|
|
16
15
|
export function parsePowerPoint(filename: string, callback: Function, deleteOfficeDist?: boolean): void;
|
|
17
|
-
|
|
18
16
|
/** Main function for parsing text from Excel files
|
|
19
17
|
* @param {string} filename File path
|
|
20
18
|
* @param {function} callback Callback function that returns value or error
|
|
@@ -22,7 +20,6 @@ export function parsePowerPoint(filename: string, callback: Function, deleteOffi
|
|
|
22
20
|
* @returns {void}
|
|
23
21
|
*/
|
|
24
22
|
export function parseExcel(filename: string, callback: Function, deleteOfficeDist?: boolean): void;
|
|
25
|
-
|
|
26
23
|
/** Main function for parsing text from open office files
|
|
27
24
|
* @param {string} filename File path
|
|
28
25
|
* @param {function} callback Callback function that returns value or error
|
|
@@ -30,7 +27,6 @@ export function parseExcel(filename: string, callback: Function, deleteOfficeDis
|
|
|
30
27
|
* @returns {void}
|
|
31
28
|
*/
|
|
32
29
|
export function parseOpenOffice(filename: string, callback: Function, deleteOfficeDist?: boolean): void;
|
|
33
|
-
|
|
34
30
|
/** Main async function with callback to execute parseOffice for supported files
|
|
35
31
|
* @param {string} filename File path
|
|
36
32
|
* @param {function} callback Callback function that returns value or error
|
|
@@ -38,55 +34,47 @@ export function parseOpenOffice(filename: string, callback: Function, deleteOffi
|
|
|
38
34
|
* @returns {void}
|
|
39
35
|
*/
|
|
40
36
|
export function parseOffice(filename: string, callback: Function, deleteOfficeDist?: boolean): void;
|
|
41
|
-
|
|
42
37
|
/** Async function that can be used with await to execute parseWord. Or it can be used with promises.
|
|
43
38
|
* @param {string} filename File path
|
|
44
39
|
* @param {boolean} [deleteOfficeDist=true] Optional: Delete the officeDist directory created while unarchiving the doc file to get its content underneath. By default, we delete those files after we are done reading them.
|
|
45
|
-
* @returns {
|
|
40
|
+
* @returns {Promise<string>}
|
|
46
41
|
*/
|
|
47
|
-
export function parseWordAsync(filename: string, deleteOfficeDist?: boolean):
|
|
48
|
-
|
|
42
|
+
export function parseWordAsync(filename: string, deleteOfficeDist?: boolean): Promise<string>;
|
|
49
43
|
/** Async function that can be used with await to execute parsePowerPoint. Or it can be used with promises.
|
|
50
44
|
* @param {string} filename File path
|
|
51
45
|
* @param {boolean} [deleteOfficeDist=true] Optional: Delete the officeDist directory created while unarchiving the doc file to get its content underneath. By default, we delete those files after we are done reading them.
|
|
52
|
-
* @returns {
|
|
46
|
+
* @returns {Promise<string>}
|
|
53
47
|
*/
|
|
54
|
-
export function parsePowerPointAsync(filename: string, deleteOfficeDist?: boolean):
|
|
55
|
-
|
|
48
|
+
export function parsePowerPointAsync(filename: string, deleteOfficeDist?: boolean): Promise<string>;
|
|
56
49
|
/** Async function that can be used with await to execute parseExcel. Or it can be used with promises.
|
|
57
50
|
* @param {string} filename File path
|
|
58
51
|
* @param {boolean} [deleteOfficeDist=true] Optional: Delete the officeDist directory created while unarchiving the doc file to get its content underneath. By default, we delete those files after we are done reading them.
|
|
59
|
-
* @returns {
|
|
52
|
+
* @returns {Promise<string>}
|
|
60
53
|
*/
|
|
61
|
-
export function parseExcelAsync(filename: string, deleteOfficeDist?: boolean):
|
|
62
|
-
|
|
54
|
+
export function parseExcelAsync(filename: string, deleteOfficeDist?: boolean): Promise<string>;
|
|
63
55
|
/** Async function that can be used with await to execute parseOpenOffice. Or it can be used with promises.
|
|
64
56
|
* @param {string} filename File path
|
|
65
57
|
* @param {boolean} [deleteOfficeDist=true] Optional: Delete the officeDist directory created while unarchiving the doc file to get its content underneath. By default, we delete those files after we are done reading them.
|
|
66
|
-
* @returns {
|
|
58
|
+
* @returns {Promise<string>}
|
|
67
59
|
*/
|
|
68
|
-
export function parseOpenOfficeAsync(filename: string, deleteOfficeDist?: boolean):
|
|
69
|
-
|
|
60
|
+
export function parseOpenOfficeAsync(filename: string, deleteOfficeDist?: boolean): Promise<string>;
|
|
70
61
|
/**
|
|
71
62
|
* Main async function that can be used with await to execute parseOffice. Or it can be used with promises.
|
|
72
63
|
* @param {string} filename File path
|
|
73
64
|
* @param {boolean} [deleteOfficeDist=true] Optional: Delete the officeDist directory created while unarchiving the doc file to get its content underneath. By default, we delete those files after we are done reading them.
|
|
74
|
-
* @returns {
|
|
65
|
+
* @returns {Promise<string>}
|
|
75
66
|
*/
|
|
76
|
-
export function parseOfficeAsync(filename: string, deleteOfficeDist?: boolean):
|
|
77
|
-
|
|
67
|
+
export function parseOfficeAsync(filename: string, deleteOfficeDist?: boolean): Promise<string>;
|
|
78
68
|
/**
|
|
79
69
|
* Set decompression directory. The final decompressed data will be put inside officeDist folder within your directory
|
|
80
70
|
* @param {string} newLocation Relative path to the directory that will contain officeDist folder with decompressed data
|
|
81
71
|
* @returns {void}
|
|
82
72
|
*/
|
|
83
73
|
export function setDecompressionLocation(newLocation: string): void;
|
|
84
|
-
|
|
85
74
|
/** Enable console output
|
|
86
75
|
* @returns {void}
|
|
87
76
|
*/
|
|
88
77
|
export function enableConsoleOutput(): void;
|
|
89
|
-
|
|
90
78
|
/** Disabled console output
|
|
91
79
|
* @returns {void}
|
|
92
80
|
*/
|