markitdown-ts 0.0.8 → 0.0.10
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/index.cjs +6 -3
- package/dist/index.mjs +6 -3
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -710,10 +710,13 @@ class XlsxConverter extends HtmlConverter {
|
|
|
710
710
|
}
|
|
711
711
|
let mdContent = "";
|
|
712
712
|
for (const sheetName of workbook.SheetNames) {
|
|
713
|
-
|
|
713
|
+
const sheet = workbook.Sheets[sheetName];
|
|
714
|
+
if (sheet["!ref"]) {
|
|
715
|
+
mdContent += `## ${sheetName}
|
|
714
716
|
`;
|
|
715
|
-
|
|
716
|
-
|
|
717
|
+
let htmlContent = XLSX__namespace.utils.sheet_to_html(sheet);
|
|
718
|
+
mdContent += (await this._convert(htmlContent))?.markdown.trim() + "\n\n";
|
|
719
|
+
}
|
|
717
720
|
}
|
|
718
721
|
return { title: workbook?.Props?.Title || "Untitled", markdown: mdContent, text_content: mdContent };
|
|
719
722
|
} catch (e) {
|
package/dist/index.mjs
CHANGED
|
@@ -682,10 +682,13 @@ class XlsxConverter extends HtmlConverter {
|
|
|
682
682
|
}
|
|
683
683
|
let mdContent = "";
|
|
684
684
|
for (const sheetName of workbook.SheetNames) {
|
|
685
|
-
|
|
685
|
+
const sheet = workbook.Sheets[sheetName];
|
|
686
|
+
if (sheet["!ref"]) {
|
|
687
|
+
mdContent += `## ${sheetName}
|
|
686
688
|
`;
|
|
687
|
-
|
|
688
|
-
|
|
689
|
+
let htmlContent = XLSX.utils.sheet_to_html(sheet);
|
|
690
|
+
mdContent += (await this._convert(htmlContent))?.markdown.trim() + "\n\n";
|
|
691
|
+
}
|
|
689
692
|
}
|
|
690
693
|
return { title: workbook?.Props?.Title || "Untitled", markdown: mdContent, text_content: mdContent };
|
|
691
694
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "markitdown-ts",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"homepage": "https://github.com/dead8309/markitdown-ts#readme",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@ai-sdk/openai": "^
|
|
31
|
+
"@ai-sdk/openai": "^3.0.2",
|
|
32
32
|
"@types/jsdom": "^21.1.7",
|
|
33
33
|
"@types/mime-types": "^2.1.4",
|
|
34
34
|
"@types/node": "^22.10.2",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@joplin/turndown-plugin-gfm": "^1.0.60",
|
|
48
48
|
"@xmldom/xmldom": "^0.9.6",
|
|
49
|
-
"ai": "^
|
|
49
|
+
"ai": "^6.0.6",
|
|
50
50
|
"jsdom": "^25.0.1",
|
|
51
51
|
"mammoth": "^1.8.0",
|
|
52
52
|
"mime-types": "^2.1.35",
|