regen.mde 0.7.0 → 0.8.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/LICENSE +16 -16
- package/bin/build-corpus-editor.js +83 -83
- package/bin/build-corpus.js +41 -41
- package/bin/regen-mdeditor-install.js +27 -27
- package/bin/regen-mdeditor-uninstall.js +19 -19
- package/bin/validate-katex.js +93 -93
- package/desktop/BuildCorpusEditor/BuildCorpusEditor.csproj +22 -22
- package/desktop/BuildCorpusEditor/app.manifest +16 -16
- package/dist/release/{regen-mde-0.7.0-win-x64.zip → regen-mde-0.8.0-win-x64.zip} +0 -0
- package/dist/windows-editor/BuildCorpusEditor.dll +0 -0
- package/dist/windows-editor/BuildCorpusEditor.exe +0 -0
- package/dist/windows-editor/BuildCorpusEditor.pdb +0 -0
- package/dist/windows-editor/BuildCorpusEditor.runtimeconfig.json +1 -1
- package/dist/windows-editor/wwwroot/index.html +20 -20
- package/editor-web/index.html +21 -21
- package/editor-web/vite.config.js +13 -13
- package/examples/build-corpus.config.example.json +21 -21
- package/installer/install-regen-mde.ps1 +214 -214
- package/installer/regen-mde.nsi +81 -81
- package/package.json +90 -90
- package/pyproject.toml +34 -35
- package/requirements.txt +0 -1
- package/scripts/build-windows-editor.ps1 +47 -47
- package/scripts/package-windows-editor.ps1 +90 -90
- package/scripts/run-corpus.ps1 +28 -28
- package/scripts/run-editor-implementation-plane.ps1 +226 -226
- package/scripts/run-required-tests.ps1 +98 -98
- package/scripts/run-smoke.ps1 +28 -28
- package/src/build_corpus/__init__.py +1 -1
- package/src/build_corpus/equations.py +1345 -80
- package/src/build_corpus/templates/__init__.py +1 -1
- package/src/build_corpus/validate_assets.py +46 -46
- package/tools/audit_corpus.py +203 -203
- package/tools/collect_microsoft_word_templates.py +228 -228
- package/tools/collect_online_docx_corpus.py +272 -272
- package/tools/collect_online_pptx_corpus.py +252 -252
- package/tools/compare_pptx_inputs_outputs.py +87 -87
- package/tools/roundtrip_docx_corpus.py +171 -171
- package/dist/release/regen-mde-0.3.0-win-x64-setup.exe +0 -0
- package/dist/release/regen-mde-0.3.0-win-x64.zip +0 -0
- package/dist/release/regen-mde-0.7.0-win-x64-setup.exe +0 -0
package/installer/regen-mde.nsi
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
!ifndef VERSION
|
|
2
|
-
!define VERSION "0.2.1"
|
|
3
|
-
!endif
|
|
4
|
-
!ifndef APP_SOURCE
|
|
5
|
-
!error "APP_SOURCE must point to the staged app directory"
|
|
6
|
-
!endif
|
|
7
|
-
!ifndef OUT_FILE
|
|
8
|
-
!define OUT_FILE "regen-mde-${VERSION}-win-x64-setup.exe"
|
|
9
|
-
!endif
|
|
10
|
-
|
|
11
|
-
Unicode true
|
|
12
|
-
Name "regen-mde"
|
|
13
|
-
OutFile "${OUT_FILE}"
|
|
14
|
-
InstallDir "$LOCALAPPDATA\Programs\regen-mde"
|
|
15
|
-
RequestExecutionLevel user
|
|
16
|
-
SetCompressor /SOLID lzma
|
|
17
|
-
|
|
18
|
-
!include LogicLib.nsh
|
|
19
|
-
|
|
20
|
-
Var StartMenuDir
|
|
21
|
-
|
|
22
|
-
Function .onInit
|
|
23
|
-
StrCpy $StartMenuDir "$SMPROGRAMS\LIFE AI"
|
|
24
|
-
FunctionEnd
|
|
25
|
-
|
|
26
|
-
Section "Install"
|
|
27
|
-
SetShellVarContext current
|
|
28
|
-
|
|
29
|
-
; Remove earlier app identities and npm-era shell verbs before installing.
|
|
30
|
-
RMDir /r "$LOCALAPPDATA\Programs\Manuscript Forge"
|
|
31
|
-
RMDir /r "$LOCALAPPDATA\Programs\Regen.MDeditor"
|
|
32
|
-
Delete "$SMPROGRAMS\LIFE AI\Manuscript Forge.lnk"
|
|
33
|
-
Delete "$SMPROGRAMS\LIFE AI\Regen.MDeditor.lnk"
|
|
34
|
-
Delete "$SMPROGRAMS\LIFE AI\Uninstall Regen.MDeditor.lnk"
|
|
35
|
-
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.md\shell\ManuscriptForgeOpen"
|
|
36
|
-
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.docx\shell\ManuscriptForgeOpen"
|
|
37
|
-
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.md\shell\BuildCorpusOpenEditor"
|
|
38
|
-
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.docx\shell\BuildCorpusOpenEditor"
|
|
39
|
-
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.md\shell\RegenMDEditorOpen"
|
|
40
|
-
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.docx\shell\RegenMDEditorOpen"
|
|
41
|
-
|
|
42
|
-
SetOutPath "$INSTDIR"
|
|
43
|
-
File /r "${APP_SOURCE}\*.*"
|
|
44
|
-
|
|
45
|
-
WriteUninstaller "$INSTDIR\uninstall.exe"
|
|
46
|
-
CreateDirectory "$StartMenuDir"
|
|
47
|
-
CreateShortcut "$StartMenuDir\regen-mde.lnk" "$INSTDIR\BuildCorpusEditor.exe" "" "$INSTDIR\BuildCorpusEditor.exe" 0
|
|
48
|
-
CreateShortcut "$StartMenuDir\Uninstall regen-mde.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\BuildCorpusEditor.exe" 0
|
|
49
|
-
|
|
50
|
-
WriteRegStr HKCU "Software\Classes\SystemFileAssociations\.md\shell\RegenMDEditorOpen" "MUIVerb" "Open in regen-mde"
|
|
51
|
-
WriteRegStr HKCU "Software\Classes\SystemFileAssociations\.md\shell\RegenMDEditorOpen" "Icon" "$INSTDIR\BuildCorpusEditor.exe"
|
|
52
|
-
WriteRegStr HKCU "Software\Classes\SystemFileAssociations\.md\shell\RegenMDEditorOpen\command" "" '"$INSTDIR\BuildCorpusEditor.exe" "%1"'
|
|
53
|
-
|
|
54
|
-
WriteRegStr HKCU "Software\Classes\SystemFileAssociations\.docx\shell\RegenMDEditorOpen" "MUIVerb" "Open in regen-mde"
|
|
55
|
-
WriteRegStr HKCU "Software\Classes\SystemFileAssociations\.docx\shell\RegenMDEditorOpen" "Icon" "$INSTDIR\BuildCorpusEditor.exe"
|
|
56
|
-
WriteRegStr HKCU "Software\Classes\SystemFileAssociations\.docx\shell\RegenMDEditorOpen\command" "" '"$INSTDIR\BuildCorpusEditor.exe" "%1"'
|
|
57
|
-
|
|
58
|
-
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\regen-mde" "DisplayName" "regen-mde"
|
|
59
|
-
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\regen-mde" "DisplayVersion" "${VERSION}"
|
|
60
|
-
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\regen-mde" "Publisher" "LIFE AI"
|
|
61
|
-
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\regen-mde" "InstallLocation" "$INSTDIR"
|
|
62
|
-
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\regen-mde" "DisplayIcon" "$INSTDIR\BuildCorpusEditor.exe"
|
|
63
|
-
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\regen-mde" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
|
64
|
-
SectionEnd
|
|
65
|
-
|
|
66
|
-
Section "Uninstall"
|
|
67
|
-
SetShellVarContext current
|
|
68
|
-
Delete "$SMPROGRAMS\LIFE AI\regen-mde.lnk"
|
|
69
|
-
Delete "$SMPROGRAMS\LIFE AI\Uninstall regen-mde.lnk"
|
|
70
|
-
RMDir "$SMPROGRAMS\LIFE AI"
|
|
71
|
-
|
|
72
|
-
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.md\shell\RegenMDEditorOpen"
|
|
73
|
-
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.docx\shell\RegenMDEditorOpen"
|
|
74
|
-
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.md\shell\ManuscriptForgeOpen"
|
|
75
|
-
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.docx\shell\ManuscriptForgeOpen"
|
|
76
|
-
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.md\shell\BuildCorpusOpenEditor"
|
|
77
|
-
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.docx\shell\BuildCorpusOpenEditor"
|
|
78
|
-
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\regen-mde"
|
|
79
|
-
|
|
80
|
-
RMDir /r "$INSTDIR"
|
|
81
|
-
SectionEnd
|
|
1
|
+
!ifndef VERSION
|
|
2
|
+
!define VERSION "0.2.1"
|
|
3
|
+
!endif
|
|
4
|
+
!ifndef APP_SOURCE
|
|
5
|
+
!error "APP_SOURCE must point to the staged app directory"
|
|
6
|
+
!endif
|
|
7
|
+
!ifndef OUT_FILE
|
|
8
|
+
!define OUT_FILE "regen-mde-${VERSION}-win-x64-setup.exe"
|
|
9
|
+
!endif
|
|
10
|
+
|
|
11
|
+
Unicode true
|
|
12
|
+
Name "regen-mde"
|
|
13
|
+
OutFile "${OUT_FILE}"
|
|
14
|
+
InstallDir "$LOCALAPPDATA\Programs\regen-mde"
|
|
15
|
+
RequestExecutionLevel user
|
|
16
|
+
SetCompressor /SOLID lzma
|
|
17
|
+
|
|
18
|
+
!include LogicLib.nsh
|
|
19
|
+
|
|
20
|
+
Var StartMenuDir
|
|
21
|
+
|
|
22
|
+
Function .onInit
|
|
23
|
+
StrCpy $StartMenuDir "$SMPROGRAMS\LIFE AI"
|
|
24
|
+
FunctionEnd
|
|
25
|
+
|
|
26
|
+
Section "Install"
|
|
27
|
+
SetShellVarContext current
|
|
28
|
+
|
|
29
|
+
; Remove earlier app identities and npm-era shell verbs before installing.
|
|
30
|
+
RMDir /r "$LOCALAPPDATA\Programs\Manuscript Forge"
|
|
31
|
+
RMDir /r "$LOCALAPPDATA\Programs\Regen.MDeditor"
|
|
32
|
+
Delete "$SMPROGRAMS\LIFE AI\Manuscript Forge.lnk"
|
|
33
|
+
Delete "$SMPROGRAMS\LIFE AI\Regen.MDeditor.lnk"
|
|
34
|
+
Delete "$SMPROGRAMS\LIFE AI\Uninstall Regen.MDeditor.lnk"
|
|
35
|
+
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.md\shell\ManuscriptForgeOpen"
|
|
36
|
+
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.docx\shell\ManuscriptForgeOpen"
|
|
37
|
+
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.md\shell\BuildCorpusOpenEditor"
|
|
38
|
+
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.docx\shell\BuildCorpusOpenEditor"
|
|
39
|
+
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.md\shell\RegenMDEditorOpen"
|
|
40
|
+
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.docx\shell\RegenMDEditorOpen"
|
|
41
|
+
|
|
42
|
+
SetOutPath "$INSTDIR"
|
|
43
|
+
File /r "${APP_SOURCE}\*.*"
|
|
44
|
+
|
|
45
|
+
WriteUninstaller "$INSTDIR\uninstall.exe"
|
|
46
|
+
CreateDirectory "$StartMenuDir"
|
|
47
|
+
CreateShortcut "$StartMenuDir\regen-mde.lnk" "$INSTDIR\BuildCorpusEditor.exe" "" "$INSTDIR\BuildCorpusEditor.exe" 0
|
|
48
|
+
CreateShortcut "$StartMenuDir\Uninstall regen-mde.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\BuildCorpusEditor.exe" 0
|
|
49
|
+
|
|
50
|
+
WriteRegStr HKCU "Software\Classes\SystemFileAssociations\.md\shell\RegenMDEditorOpen" "MUIVerb" "Open in regen-mde"
|
|
51
|
+
WriteRegStr HKCU "Software\Classes\SystemFileAssociations\.md\shell\RegenMDEditorOpen" "Icon" "$INSTDIR\BuildCorpusEditor.exe"
|
|
52
|
+
WriteRegStr HKCU "Software\Classes\SystemFileAssociations\.md\shell\RegenMDEditorOpen\command" "" '"$INSTDIR\BuildCorpusEditor.exe" "%1"'
|
|
53
|
+
|
|
54
|
+
WriteRegStr HKCU "Software\Classes\SystemFileAssociations\.docx\shell\RegenMDEditorOpen" "MUIVerb" "Open in regen-mde"
|
|
55
|
+
WriteRegStr HKCU "Software\Classes\SystemFileAssociations\.docx\shell\RegenMDEditorOpen" "Icon" "$INSTDIR\BuildCorpusEditor.exe"
|
|
56
|
+
WriteRegStr HKCU "Software\Classes\SystemFileAssociations\.docx\shell\RegenMDEditorOpen\command" "" '"$INSTDIR\BuildCorpusEditor.exe" "%1"'
|
|
57
|
+
|
|
58
|
+
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\regen-mde" "DisplayName" "regen-mde"
|
|
59
|
+
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\regen-mde" "DisplayVersion" "${VERSION}"
|
|
60
|
+
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\regen-mde" "Publisher" "LIFE AI"
|
|
61
|
+
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\regen-mde" "InstallLocation" "$INSTDIR"
|
|
62
|
+
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\regen-mde" "DisplayIcon" "$INSTDIR\BuildCorpusEditor.exe"
|
|
63
|
+
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\regen-mde" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
|
64
|
+
SectionEnd
|
|
65
|
+
|
|
66
|
+
Section "Uninstall"
|
|
67
|
+
SetShellVarContext current
|
|
68
|
+
Delete "$SMPROGRAMS\LIFE AI\regen-mde.lnk"
|
|
69
|
+
Delete "$SMPROGRAMS\LIFE AI\Uninstall regen-mde.lnk"
|
|
70
|
+
RMDir "$SMPROGRAMS\LIFE AI"
|
|
71
|
+
|
|
72
|
+
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.md\shell\RegenMDEditorOpen"
|
|
73
|
+
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.docx\shell\RegenMDEditorOpen"
|
|
74
|
+
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.md\shell\ManuscriptForgeOpen"
|
|
75
|
+
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.docx\shell\ManuscriptForgeOpen"
|
|
76
|
+
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.md\shell\BuildCorpusOpenEditor"
|
|
77
|
+
DeleteRegKey HKCU "Software\Classes\SystemFileAssociations\.docx\shell\BuildCorpusOpenEditor"
|
|
78
|
+
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\regen-mde"
|
|
79
|
+
|
|
80
|
+
RMDir /r "$INSTDIR"
|
|
81
|
+
SectionEnd
|
package/package.json
CHANGED
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "regen.mde",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Convert between DOCX/PPTX and Markdown — Word OMML equations to KaTeX TeX on the way in, LaTeX to native OMML on the way out.",
|
|
5
|
-
"bin": {
|
|
6
|
-
"build-corpus": "bin/build-corpus.js",
|
|
7
|
-
"build-corpus-editor": "bin/build-corpus-editor.js",
|
|
8
|
-
"mdeditor": "bin/build-corpus-editor.js",
|
|
9
|
-
"regen-mde": "bin/build-corpus-editor.js",
|
|
10
|
-
"regen-mdeditor": "bin/build-corpus-editor.js",
|
|
11
|
-
"regen-mdeditor-install": "bin/regen-mdeditor-install.js",
|
|
12
|
-
"regen-mdeditor-uninstall": "bin/regen-mdeditor-uninstall.js",
|
|
13
|
-
"build-corpus-katex": "bin/validate-katex.js"
|
|
14
|
-
},
|
|
15
|
-
"files": [
|
|
16
|
-
"bin/",
|
|
17
|
-
"desktop/BuildCorpusEditor/*.cs",
|
|
18
|
-
"desktop/BuildCorpusEditor/*.csproj",
|
|
19
|
-
"desktop/BuildCorpusEditor/*.manifest",
|
|
20
|
-
"dist/release/regen-mde-*-win-x64-setup.exe",
|
|
21
|
-
"dist/release/regen-mde-*-win-x64.zip",
|
|
22
|
-
"dist/windows-editor/",
|
|
23
|
-
"editor-web/",
|
|
24
|
-
"installer/",
|
|
25
|
-
"src/build_corpus/*.py",
|
|
26
|
-
"src/build_corpus/templates/*.py",
|
|
27
|
-
"src/build_corpus/templates/*.dotx",
|
|
28
|
-
"examples/",
|
|
29
|
-
"scripts/",
|
|
30
|
-
"tools/*.py",
|
|
31
|
-
"pyproject.toml",
|
|
32
|
-
"requirements.txt",
|
|
33
|
-
"README.md",
|
|
34
|
-
"LICENSE"
|
|
35
|
-
],
|
|
36
|
-
"scripts": {
|
|
37
|
-
"editor:build": "vite build --config editor-web/vite.config.js",
|
|
38
|
-
"editor:windows": "powershell.exe -ExecutionPolicy Bypass -File scripts/build-windows-editor.ps1",
|
|
39
|
-
"editor:package": "powershell.exe -ExecutionPolicy Bypass -File scripts/package-windows-editor.ps1",
|
|
40
|
-
"test:conversion": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/run-required-tests.ps1 -Suite Conversion",
|
|
41
|
-
"test:editor": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/run-required-tests.ps1 -Suite Editor",
|
|
42
|
-
"test:required": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/run-required-tests.ps1 -Suite Auto",
|
|
43
|
-
"test:all": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/run-required-tests.ps1 -Suite All",
|
|
44
|
-
"release": "node scripts/release-dual.mjs",
|
|
45
|
-
"prepack": "npm run editor:windows && npm run editor:package",
|
|
46
|
-
"postinstall": "node bin/postinstall.js",
|
|
47
|
-
"preuninstall": "node bin/postinstall.js --uninstall",
|
|
48
|
-
"test": "node bin/build-corpus.js --help && node bin/validate-katex.js README.md"
|
|
49
|
-
},
|
|
50
|
-
"dependencies": {
|
|
51
|
-
"@codemirror/lang-markdown": "^6.5.0",
|
|
52
|
-
"@codemirror/theme-one-dark": "^6.1.3",
|
|
53
|
-
"@tiptap/extension-bubble-menu": "^3.23.1",
|
|
54
|
-
"@tiptap/extension-floating-menu": "^3.23.1",
|
|
55
|
-
"@tiptap/extension-image": "^3.23.1",
|
|
56
|
-
"@tiptap/extension-link": "^3.23.1",
|
|
57
|
-
"@tiptap/extension-placeholder": "^3.23.1",
|
|
58
|
-
"@tiptap/extension-table": "^3.23.1",
|
|
59
|
-
"@tiptap/extension-table-cell": "^3.23.1",
|
|
60
|
-
"@tiptap/extension-table-header": "^3.23.1",
|
|
61
|
-
"@tiptap/extension-table-row": "^3.23.1",
|
|
62
|
-
"@tiptap/extension-task-item": "^3.23.1",
|
|
63
|
-
"@tiptap/extension-task-list": "^3.23.1",
|
|
64
|
-
"@tiptap/react": "^3.23.1",
|
|
65
|
-
"@tiptap/starter-kit": "^3.23.1",
|
|
66
|
-
"@uiw/react-codemirror": "^4.25.9",
|
|
67
|
-
"katex": "^0.16.22",
|
|
68
|
-
"marked": "^15.0.12",
|
|
69
|
-
"react": "^19.2.6",
|
|
70
|
-
"react-dom": "^19.2.6",
|
|
71
|
-
"turndown": "^7.2.4"
|
|
72
|
-
},
|
|
73
|
-
"keywords": [
|
|
74
|
-
"docx",
|
|
75
|
-
"markdown",
|
|
76
|
-
"word",
|
|
77
|
-
"omml",
|
|
78
|
-
"katex",
|
|
79
|
-
"converter"
|
|
80
|
-
],
|
|
81
|
-
"author": "LIFE AI",
|
|
82
|
-
"license": "Apache-2.0",
|
|
83
|
-
"engines": {
|
|
84
|
-
"node": ">=18"
|
|
85
|
-
},
|
|
86
|
-
"devDependencies": {
|
|
87
|
-
"@vitejs/plugin-react": "^4.7.0",
|
|
88
|
-
"vite": "^6.4.2"
|
|
89
|
-
}
|
|
90
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "regen.mde",
|
|
3
|
+
"version": "0.8.0",
|
|
4
|
+
"description": "Convert between DOCX/PPTX and Markdown — Word OMML equations to KaTeX TeX on the way in, LaTeX to native OMML on the way out.",
|
|
5
|
+
"bin": {
|
|
6
|
+
"build-corpus": "bin/build-corpus.js",
|
|
7
|
+
"build-corpus-editor": "bin/build-corpus-editor.js",
|
|
8
|
+
"mdeditor": "bin/build-corpus-editor.js",
|
|
9
|
+
"regen-mde": "bin/build-corpus-editor.js",
|
|
10
|
+
"regen-mdeditor": "bin/build-corpus-editor.js",
|
|
11
|
+
"regen-mdeditor-install": "bin/regen-mdeditor-install.js",
|
|
12
|
+
"regen-mdeditor-uninstall": "bin/regen-mdeditor-uninstall.js",
|
|
13
|
+
"build-corpus-katex": "bin/validate-katex.js"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"bin/",
|
|
17
|
+
"desktop/BuildCorpusEditor/*.cs",
|
|
18
|
+
"desktop/BuildCorpusEditor/*.csproj",
|
|
19
|
+
"desktop/BuildCorpusEditor/*.manifest",
|
|
20
|
+
"dist/release/regen-mde-*-win-x64-setup.exe",
|
|
21
|
+
"dist/release/regen-mde-*-win-x64.zip",
|
|
22
|
+
"dist/windows-editor/",
|
|
23
|
+
"editor-web/",
|
|
24
|
+
"installer/",
|
|
25
|
+
"src/build_corpus/*.py",
|
|
26
|
+
"src/build_corpus/templates/*.py",
|
|
27
|
+
"src/build_corpus/templates/*.dotx",
|
|
28
|
+
"examples/",
|
|
29
|
+
"scripts/",
|
|
30
|
+
"tools/*.py",
|
|
31
|
+
"pyproject.toml",
|
|
32
|
+
"requirements.txt",
|
|
33
|
+
"README.md",
|
|
34
|
+
"LICENSE"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"editor:build": "vite build --config editor-web/vite.config.js",
|
|
38
|
+
"editor:windows": "powershell.exe -ExecutionPolicy Bypass -File scripts/build-windows-editor.ps1",
|
|
39
|
+
"editor:package": "powershell.exe -ExecutionPolicy Bypass -File scripts/package-windows-editor.ps1",
|
|
40
|
+
"test:conversion": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/run-required-tests.ps1 -Suite Conversion",
|
|
41
|
+
"test:editor": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/run-required-tests.ps1 -Suite Editor",
|
|
42
|
+
"test:required": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/run-required-tests.ps1 -Suite Auto",
|
|
43
|
+
"test:all": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/run-required-tests.ps1 -Suite All",
|
|
44
|
+
"release": "node scripts/release-dual.mjs",
|
|
45
|
+
"prepack": "npm run editor:windows && npm run editor:package",
|
|
46
|
+
"postinstall": "node bin/postinstall.js",
|
|
47
|
+
"preuninstall": "node bin/postinstall.js --uninstall",
|
|
48
|
+
"test": "node bin/build-corpus.js --help && node bin/validate-katex.js README.md"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@codemirror/lang-markdown": "^6.5.0",
|
|
52
|
+
"@codemirror/theme-one-dark": "^6.1.3",
|
|
53
|
+
"@tiptap/extension-bubble-menu": "^3.23.1",
|
|
54
|
+
"@tiptap/extension-floating-menu": "^3.23.1",
|
|
55
|
+
"@tiptap/extension-image": "^3.23.1",
|
|
56
|
+
"@tiptap/extension-link": "^3.23.1",
|
|
57
|
+
"@tiptap/extension-placeholder": "^3.23.1",
|
|
58
|
+
"@tiptap/extension-table": "^3.23.1",
|
|
59
|
+
"@tiptap/extension-table-cell": "^3.23.1",
|
|
60
|
+
"@tiptap/extension-table-header": "^3.23.1",
|
|
61
|
+
"@tiptap/extension-table-row": "^3.23.1",
|
|
62
|
+
"@tiptap/extension-task-item": "^3.23.1",
|
|
63
|
+
"@tiptap/extension-task-list": "^3.23.1",
|
|
64
|
+
"@tiptap/react": "^3.23.1",
|
|
65
|
+
"@tiptap/starter-kit": "^3.23.1",
|
|
66
|
+
"@uiw/react-codemirror": "^4.25.9",
|
|
67
|
+
"katex": "^0.16.22",
|
|
68
|
+
"marked": "^15.0.12",
|
|
69
|
+
"react": "^19.2.6",
|
|
70
|
+
"react-dom": "^19.2.6",
|
|
71
|
+
"turndown": "^7.2.4"
|
|
72
|
+
},
|
|
73
|
+
"keywords": [
|
|
74
|
+
"docx",
|
|
75
|
+
"markdown",
|
|
76
|
+
"word",
|
|
77
|
+
"omml",
|
|
78
|
+
"katex",
|
|
79
|
+
"converter"
|
|
80
|
+
],
|
|
81
|
+
"author": "LIFE AI",
|
|
82
|
+
"license": "Apache-2.0",
|
|
83
|
+
"engines": {
|
|
84
|
+
"node": ">=18"
|
|
85
|
+
},
|
|
86
|
+
"devDependencies": {
|
|
87
|
+
"@vitejs/plugin-react": "^4.7.0",
|
|
88
|
+
"vite": "^6.4.2"
|
|
89
|
+
}
|
|
90
|
+
}
|
package/pyproject.toml
CHANGED
|
@@ -1,35 +1,34 @@
|
|
|
1
|
-
[build-system]
|
|
2
|
-
requires = ["setuptools>=69", "wheel"]
|
|
3
|
-
build-backend = "setuptools.build_meta"
|
|
4
|
-
|
|
5
|
-
[project]
|
|
6
|
-
name = "build-corpus"
|
|
7
|
-
version = "0.
|
|
8
|
-
description = "Convert between DOCX/PPTX and Markdown — Word OMML equations to KaTeX TeX inbound, LaTeX to native OMML outbound."
|
|
9
|
-
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.10"
|
|
11
|
-
license = "Apache-2.0"
|
|
12
|
-
authors = [
|
|
13
|
-
{ name = "LIFE AI" }
|
|
14
|
-
]
|
|
15
|
-
keywords = ["docx", "markdown", "omml", "katex", "word", "converter"]
|
|
16
|
-
dependencies = [
|
|
17
|
-
"omml2latex>=0.1.1",
|
|
18
|
-
"Pillow>=10.0.0",
|
|
19
|
-
"python-docx>=1.1.2",
|
|
20
|
-
"latex2mathml>=3.77"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
[
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
[
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
[
|
|
35
|
-
build_corpus = ["templates/*.dotx"]
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=69", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "build-corpus"
|
|
7
|
+
version = "0.8.0"
|
|
8
|
+
description = "Convert between DOCX/PPTX and Markdown — Word OMML equations to KaTeX TeX inbound, LaTeX to native OMML outbound."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = "Apache-2.0"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "LIFE AI" }
|
|
14
|
+
]
|
|
15
|
+
keywords = ["docx", "markdown", "omml", "katex", "word", "converter"]
|
|
16
|
+
dependencies = [
|
|
17
|
+
"omml2latex>=0.1.1",
|
|
18
|
+
"Pillow>=10.0.0",
|
|
19
|
+
"python-docx>=1.1.2",
|
|
20
|
+
"latex2mathml>=3.77"
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
[project.optional-dependencies]
|
|
24
|
+
s3 = ["boto3>=1.34"]
|
|
25
|
+
dev = ["build>=1.2", "twine>=5.0"]
|
|
26
|
+
|
|
27
|
+
[project.scripts]
|
|
28
|
+
"build-corpus" = "build_corpus.exporter:main"
|
|
29
|
+
|
|
30
|
+
[tool.setuptools.packages.find]
|
|
31
|
+
where = ["src"]
|
|
32
|
+
|
|
33
|
+
[tool.setuptools.package-data]
|
|
34
|
+
build_corpus = ["templates/*.dotx"]
|
package/requirements.txt
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
[CmdletBinding()]
|
|
2
|
-
param(
|
|
3
|
-
[string]$Root = ""
|
|
4
|
-
)
|
|
5
|
-
|
|
6
|
-
$ErrorActionPreference = "Stop"
|
|
7
|
-
|
|
8
|
-
if ([string]::IsNullOrWhiteSpace($Root)) {
|
|
9
|
-
$Root = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function Invoke-Checked {
|
|
13
|
-
param([string]$FilePath, [string[]]$Arguments)
|
|
14
|
-
Write-Host "+ $FilePath $($Arguments -join ' ')" -ForegroundColor DarkGray
|
|
15
|
-
Push-Location $Root
|
|
16
|
-
try {
|
|
17
|
-
& $FilePath @Arguments
|
|
18
|
-
$exitCode = if ($LASTEXITCODE -is [int]) { $LASTEXITCODE } else { 0 }
|
|
19
|
-
} finally {
|
|
20
|
-
Pop-Location
|
|
21
|
-
}
|
|
22
|
-
if ($exitCode -ne 0) {
|
|
23
|
-
throw "Command failed with exit code ${exitCode}: $FilePath $($Arguments -join ' ')"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
Invoke-Checked "npm" @("run", "editor:build")
|
|
28
|
-
|
|
29
|
-
Get-Process BuildCorpusEditor -ErrorAction SilentlyContinue | Stop-Process -Force
|
|
30
|
-
|
|
31
|
-
Invoke-Checked "dotnet" @(
|
|
32
|
-
"publish",
|
|
33
|
-
"desktop\BuildCorpusEditor\BuildCorpusEditor.csproj",
|
|
34
|
-
"-c", "Release",
|
|
35
|
-
"-r", "win-x64",
|
|
36
|
-
"--self-contained", "false",
|
|
37
|
-
"-o", "dist\windows-editor"
|
|
38
|
-
)
|
|
39
|
-
|
|
40
|
-
$exe = Join-Path $Root "dist\windows-editor\BuildCorpusEditor.exe"
|
|
41
|
-
if (-not (Test-Path -LiteralPath $exe)) {
|
|
42
|
-
throw "Expected executable missing: $exe"
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
Remove-Item -LiteralPath (Join-Path $Root "dist\windows-editor\BuildCorpusEditor.exe.WebView2") -Recurse -Force -ErrorAction SilentlyContinue
|
|
46
|
-
|
|
47
|
-
Write-Host "Built $exe" -ForegroundColor Green
|
|
1
|
+
[CmdletBinding()]
|
|
2
|
+
param(
|
|
3
|
+
[string]$Root = ""
|
|
4
|
+
)
|
|
5
|
+
|
|
6
|
+
$ErrorActionPreference = "Stop"
|
|
7
|
+
|
|
8
|
+
if ([string]::IsNullOrWhiteSpace($Root)) {
|
|
9
|
+
$Root = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function Invoke-Checked {
|
|
13
|
+
param([string]$FilePath, [string[]]$Arguments)
|
|
14
|
+
Write-Host "+ $FilePath $($Arguments -join ' ')" -ForegroundColor DarkGray
|
|
15
|
+
Push-Location $Root
|
|
16
|
+
try {
|
|
17
|
+
& $FilePath @Arguments
|
|
18
|
+
$exitCode = if ($LASTEXITCODE -is [int]) { $LASTEXITCODE } else { 0 }
|
|
19
|
+
} finally {
|
|
20
|
+
Pop-Location
|
|
21
|
+
}
|
|
22
|
+
if ($exitCode -ne 0) {
|
|
23
|
+
throw "Command failed with exit code ${exitCode}: $FilePath $($Arguments -join ' ')"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
Invoke-Checked "npm" @("run", "editor:build")
|
|
28
|
+
|
|
29
|
+
Get-Process BuildCorpusEditor -ErrorAction SilentlyContinue | Stop-Process -Force
|
|
30
|
+
|
|
31
|
+
Invoke-Checked "dotnet" @(
|
|
32
|
+
"publish",
|
|
33
|
+
"desktop\BuildCorpusEditor\BuildCorpusEditor.csproj",
|
|
34
|
+
"-c", "Release",
|
|
35
|
+
"-r", "win-x64",
|
|
36
|
+
"--self-contained", "false",
|
|
37
|
+
"-o", "dist\windows-editor"
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
$exe = Join-Path $Root "dist\windows-editor\BuildCorpusEditor.exe"
|
|
41
|
+
if (-not (Test-Path -LiteralPath $exe)) {
|
|
42
|
+
throw "Expected executable missing: $exe"
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
Remove-Item -LiteralPath (Join-Path $Root "dist\windows-editor\BuildCorpusEditor.exe.WebView2") -Recurse -Force -ErrorAction SilentlyContinue
|
|
46
|
+
|
|
47
|
+
Write-Host "Built $exe" -ForegroundColor Green
|