@liascript/exporter 3.0.0--1.0.3 → 3.0.1--1.0.3
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/assets/capacitor/{index.bfe7363b.js → index.a7f021f7.js} +1 -1
- package/dist/assets/capacitor/index.html +1 -1
- package/dist/assets/capacitor/{jszip.min.f6eda75b.js → jszip.min.43389eb1.js} +1 -1
- package/dist/assets/capacitor/{trystero-ipfs.min.b27a61d7.js → trystero-ipfs.min.f25fe3e7.js} +1 -1
- package/dist/assets/indexeddb/{index.599a57d6.js → index.4aceca2f.js} +1 -1
- package/dist/assets/indexeddb/index.html +1 -1
- package/dist/assets/indexeddb/{jszip.min.63142cc8.js → jszip.min.4fbcc13f.js} +1 -1
- package/dist/assets/scorm2004/{index.7a5820ab.js → index.33bec53a.js} +1 -1
- package/dist/assets/scorm2004/index.html +1 -1
- package/dist/assets/scorm2004/{jszip.min.63142cc8.js → jszip.min.4fbcc13f.js} +1 -1
- package/dist/assets/xapi/{index.018a032a.js → index.f2e89e49.js} +1 -1
- package/dist/assets/xapi/index.html +1 -1
- package/dist/assets/xapi/{jszip.min.eaecf580.js → jszip.min.19c66d77.js} +1 -1
- package/dist/index.js +47 -47
- package/dist/server/presets.json +94 -0
- package/dist/server/presets.yaml +120 -0
- package/dist/server/public/app.js +1 -0
- package/dist/server/public/assets/android.svg +38 -0
- package/dist/server/public/assets/cmi.svg +154 -0
- package/dist/server/public/assets/docx.svg +20 -0
- package/dist/server/public/assets/edX.svg +75 -0
- package/dist/server/public/assets/edx.svg +75 -0
- package/dist/server/public/assets/epub.svg +18 -0
- package/dist/server/public/assets/icon.svg +82 -0
- package/dist/server/public/assets/ilias.png +0 -0
- package/dist/server/public/assets/json.svg +4 -0
- package/dist/server/public/assets/learnworlds.png +0 -0
- package/dist/server/public/assets/moodle.svg +190 -0
- package/dist/server/public/assets/opal.png +0 -0
- package/dist/server/public/assets/openolat.png +0 -0
- package/dist/server/public/assets/pdf.svg +4 -0
- package/dist/server/public/assets/rdf.svg +4 -0
- package/dist/server/public/assets/scorm.png +0 -0
- package/dist/server/public/assets/web.png +0 -0
- package/dist/server/public/assets/xapi.png +0 -0
- package/dist/server/public/i18n.js +1 -0
- package/dist/server/public/index.html +1587 -0
- package/dist/server/public/locales/de.json +247 -0
- package/dist/server/public/locales/en.json +247 -0
- package/dist/server/public/status.html +251 -0
- package/dist/server/public/styles.css +712 -0
- package/package.json +5 -1
- package/.parcelrc +0 -3
- package/DESKTOP_APP_README.md +0 -58
- package/DOCKERHUB_DESCRIPTION.md +0 -52
- package/Dockerfile +0 -129
- package/PLAYSTORE_GUIDE.md +0 -172
- package/action.yml +0 -157
- package/custom.css +0 -10
- package/electron-builder.json +0 -149
- package/src/cli.ts +0 -69
- package/src/colorize.ts +0 -115
- package/src/export/android.ts +0 -419
- package/src/export/docx.ts +0 -1025
- package/src/export/epub.ts +0 -1306
- package/src/export/h5p.ts +0 -390
- package/src/export/helper.ts +0 -360
- package/src/export/ims.ts +0 -191
- package/src/export/pdf.ts +0 -406
- package/src/export/presets.ts +0 -220
- package/src/export/project.ts +0 -829
- package/src/export/rdf.ts +0 -551
- package/src/export/scorm12.ts +0 -167
- package/src/export/scorm2004.ts +0 -140
- package/src/export/web.ts +0 -306
- package/src/export/xapi.ts +0 -424
- package/src/exporter.ts +0 -296
- package/src/index.ts +0 -96
- package/src/parser.ts +0 -373
- package/src/presets.yaml +0 -219
- package/src/types.ts +0 -82
- package/tsconfig.json +0 -24
package/src/parser.ts
DELETED
|
@@ -1,373 +0,0 @@
|
|
|
1
|
-
import * as helper from './export/helper'
|
|
2
|
-
import * as WEB from './export/web'
|
|
3
|
-
import * as SCORM12 from './export/scorm12'
|
|
4
|
-
import * as SCORM2004 from './export/scorm2004'
|
|
5
|
-
import * as PDF from './export/pdf'
|
|
6
|
-
import * as EPUB from './export/epub'
|
|
7
|
-
import * as IMS from './export/ims'
|
|
8
|
-
import * as ANDROID from './export/android'
|
|
9
|
-
import * as PROJECT from './export/project'
|
|
10
|
-
import * as RDF from './export/rdf'
|
|
11
|
-
import * as XAPI from './export/xapi'
|
|
12
|
-
import * as DOCX from './export/docx'
|
|
13
|
-
import * as PRESETS from './export/presets'
|
|
14
|
-
import path from 'path'
|
|
15
|
-
import { ExportFormat } from './types'
|
|
16
|
-
|
|
17
|
-
// @ts-expect-error - minimist has no type definitions
|
|
18
|
-
import minimist from 'minimist'
|
|
19
|
-
|
|
20
|
-
// Type aliases for cleaner composition
|
|
21
|
-
type BaseArguments = {
|
|
22
|
-
input: string
|
|
23
|
-
readme: string
|
|
24
|
-
output: string
|
|
25
|
-
format: string
|
|
26
|
-
path: string
|
|
27
|
-
key?: string
|
|
28
|
-
style?: string
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// Compose all export-specific arguments into a single type
|
|
32
|
-
export type Arguments = BaseArguments &
|
|
33
|
-
Partial<WEB.WebExportArguments> &
|
|
34
|
-
Partial<SCORM12.Scorm12ExportArguments> &
|
|
35
|
-
Partial<SCORM2004.Scorm2004ExportArguments> &
|
|
36
|
-
Partial<PDF.PdfExportArguments> &
|
|
37
|
-
Partial<EPUB.EpubExportArguments> &
|
|
38
|
-
Partial<DOCX.DocxExportArguments> &
|
|
39
|
-
Partial<IMS.ImsExportArguments> &
|
|
40
|
-
Partial<ANDROID.AndroidExportArguments> &
|
|
41
|
-
Partial<PROJECT.ProjectExportArguments> &
|
|
42
|
-
Partial<RDF.RDFArguments> &
|
|
43
|
-
Partial<XAPI.XapiExportArguments>
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Escapes backslashes in Windows paths
|
|
47
|
-
*/
|
|
48
|
-
function escapeBackslash(path?: string): string | undefined {
|
|
49
|
-
if (path) {
|
|
50
|
-
return path.replace(/\\/g, '\\\\')
|
|
51
|
-
}
|
|
52
|
-
return path
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Parses command-line arguments into a structured Arguments object
|
|
57
|
-
*/
|
|
58
|
-
export function parseArguments(): Arguments {
|
|
59
|
-
const argv = minimist(process.argv.slice(2))
|
|
60
|
-
|
|
61
|
-
const argument: Arguments = {
|
|
62
|
-
input: argv.i || argv.input,
|
|
63
|
-
readme: argv.i || argv.input,
|
|
64
|
-
output: argv.o || argv.output || 'output',
|
|
65
|
-
format: argv.f || argv.format || 'json',
|
|
66
|
-
path: argv.p || argv.path,
|
|
67
|
-
key: argv.k || argv.key,
|
|
68
|
-
style: argv.s || argv.style,
|
|
69
|
-
|
|
70
|
-
// special cases for SCORM
|
|
71
|
-
'scorm-organization': argv['scorm-organization'],
|
|
72
|
-
'scorm-masteryScore': argv['scorm-masteryScore'],
|
|
73
|
-
'scorm-typicalDuration': argv['scorm-typicalDuration'],
|
|
74
|
-
'scorm-iframe': argv['scorm-iframe'],
|
|
75
|
-
'scorm-embed': argv['scorm-embed'],
|
|
76
|
-
'scorm-alwaysActive': argv['scorm-alwaysActive'],
|
|
77
|
-
|
|
78
|
-
// special IMS cases
|
|
79
|
-
'ims-indexeddb': argv['ims-indexeddb'],
|
|
80
|
-
|
|
81
|
-
// web-cases
|
|
82
|
-
'web-zip': argv['web-zip'],
|
|
83
|
-
'web-indexeddb': argv['web-indexeddb'],
|
|
84
|
-
'web-iframe': argv['web-iframe'],
|
|
85
|
-
|
|
86
|
-
// pdf cases
|
|
87
|
-
'pdf-preview': argv['pdf-preview'],
|
|
88
|
-
'pdf-scale': argv['pdf-scale'],
|
|
89
|
-
'pdf-displayHeaderFooter': argv['pdf-displayHeaderFooter'],
|
|
90
|
-
'pdf-headerTemplate': argv['pdf-headerTemplate'],
|
|
91
|
-
'pdf-footerTemplate': argv['pdf-footerTemplate'],
|
|
92
|
-
'pdf-printBackground': argv['pdf-printBackground'],
|
|
93
|
-
'pdf-landscape': argv['pdf-landscape'],
|
|
94
|
-
'pdf-format': argv['pdf-format'] || 'A4',
|
|
95
|
-
'pdf-width': argv['pdf-width'],
|
|
96
|
-
'pdf-height': argv['pdf-height'],
|
|
97
|
-
'pdf-margin-top': argv['pdf-margin-top'],
|
|
98
|
-
'pdf-margin-bottom': argv['pdf-margin-bottom'],
|
|
99
|
-
'pdf-margin-right': argv['pdf-margin-right'],
|
|
100
|
-
'pdf-margin-left': argv['pdf-margin-left'],
|
|
101
|
-
'pdf-preferCSSPageSize': argv['pdf-preferCSSPageSize'],
|
|
102
|
-
'pdf-omitBackground': argv['pdf-omitBackground'],
|
|
103
|
-
'pdf-timeout': argv['pdf-timeout'],
|
|
104
|
-
'pdf-stylesheet': argv['pdf-stylesheet'],
|
|
105
|
-
'pdf-theme': argv['pdf-theme'],
|
|
106
|
-
|
|
107
|
-
// epub cases
|
|
108
|
-
'epub-author': argv['epub-author'],
|
|
109
|
-
'epub-publisher': argv['epub-publisher'],
|
|
110
|
-
'epub-cover': argv['epub-cover'],
|
|
111
|
-
'epub-stylesheet': argv['epub-stylesheet'],
|
|
112
|
-
'epub-theme': argv['epub-theme'],
|
|
113
|
-
'epub-timeout': argv['epub-timeout'],
|
|
114
|
-
'epub-preview': argv['epub-preview'],
|
|
115
|
-
|
|
116
|
-
// docx cases
|
|
117
|
-
'docx-title': argv['docx-title'],
|
|
118
|
-
'docx-author': argv['docx-author'],
|
|
119
|
-
'docx-subject': argv['docx-subject'],
|
|
120
|
-
'docx-description': argv['docx-description'],
|
|
121
|
-
'docx-language': argv['docx-language'],
|
|
122
|
-
'docx-orientation': argv['docx-orientation'],
|
|
123
|
-
'docx-font': argv['docx-font'],
|
|
124
|
-
'docx-font-size': argv['docx-font-size'],
|
|
125
|
-
'docx-header': argv['docx-header'],
|
|
126
|
-
'docx-header-html': argv['docx-header-html'],
|
|
127
|
-
'docx-footer': argv['docx-footer'],
|
|
128
|
-
'docx-footer-html': argv['docx-footer-html'],
|
|
129
|
-
'docx-page-number': argv['docx-page-number'],
|
|
130
|
-
'docx-stylesheet': argv['docx-stylesheet'],
|
|
131
|
-
'docx-theme': argv['docx-theme'],
|
|
132
|
-
'docx-timeout': argv['docx-timeout'],
|
|
133
|
-
'docx-preview': argv['docx-preview'],
|
|
134
|
-
|
|
135
|
-
'android-sdk': escapeBackslash(argv['android-sdk']),
|
|
136
|
-
'android-appId': argv['android-appId'],
|
|
137
|
-
'android-appName': argv['android-appName'],
|
|
138
|
-
'android-icon': escapeBackslash(argv['android-icon']),
|
|
139
|
-
'android-iconBackgroundColor': argv['android-iconBackgroundColor'],
|
|
140
|
-
'android-iconBackgroundColorDark': argv['android-iconBackgroundColorDark'],
|
|
141
|
-
'android-preview': argv['android-preview'],
|
|
142
|
-
'android-release': argv['android-release'],
|
|
143
|
-
'android-bundle': argv['android-bundle'],
|
|
144
|
-
'android-keystore': escapeBackslash(argv['android-keystore']),
|
|
145
|
-
'android-keystorePassword': argv['android-keystorePassword'],
|
|
146
|
-
'android-keyAlias': argv['android-keyAlias'],
|
|
147
|
-
'android-keyPassword': argv['android-keyPassword'],
|
|
148
|
-
|
|
149
|
-
// project settings
|
|
150
|
-
'project-no-meta': argv['project-no-meta'],
|
|
151
|
-
'project-no-rdf': argv['project-no-rdf'],
|
|
152
|
-
'project-no-categories': argv['project-no-categories'],
|
|
153
|
-
'project-category-blur': argv['project-category-blur'],
|
|
154
|
-
'project-generate-pdf': argv['project-generate-pdf'],
|
|
155
|
-
'project-generate-ims': argv['project-generate-ims'],
|
|
156
|
-
'project-generate-scorm12': argv['project-generate-scorm12'],
|
|
157
|
-
'project-generate-scorm2004': argv['project-generate-scorm2004'],
|
|
158
|
-
'project-generate-android': argv['project-generate-android'],
|
|
159
|
-
'project-generate-cache': argv['project-generate-cache'],
|
|
160
|
-
|
|
161
|
-
// RDF settings
|
|
162
|
-
'rdf-format': argv['rdf-format'],
|
|
163
|
-
'rdf-preview': argv['rdf-preview'],
|
|
164
|
-
'rdf-url': argv['rdf-url'],
|
|
165
|
-
'rdf-type': argv['rdf-type'],
|
|
166
|
-
'rdf-license': argv['rdf-license'],
|
|
167
|
-
'rdf-educationalLevel': argv['rdf-educationalLevel'],
|
|
168
|
-
'rdf-template': argv['rdf-template'],
|
|
169
|
-
|
|
170
|
-
// xAPI settings
|
|
171
|
-
'xapi-endpoint': argv['xapi-endpoint'],
|
|
172
|
-
'xapi-auth': argv['xapi-auth'],
|
|
173
|
-
'xapi-actor': argv['xapi-actor'],
|
|
174
|
-
'xapi-course-id': argv['xapi-course-id'],
|
|
175
|
-
'xapi-course-title': argv['xapi-course-title'],
|
|
176
|
-
'xapi-mastery-threshold': argv['xapi-mastery-threshold'],
|
|
177
|
-
'xapi-progress-threshold': argv['xapi-progress-threshold'],
|
|
178
|
-
'xapi-debug': argv['xapi-debug'],
|
|
179
|
-
'xapi-zip': argv['xapi-zip'],
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
return argument
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* Parses arguments when using presets mode
|
|
187
|
-
*/
|
|
188
|
-
export function parsePresetsArguments(presetId: string): Arguments {
|
|
189
|
-
const argv = minimist(process.argv.slice(2))
|
|
190
|
-
|
|
191
|
-
// Start with basic CLI arguments
|
|
192
|
-
const cliArgs: any = {
|
|
193
|
-
input: argv.i || argv.input,
|
|
194
|
-
output: argv.o || argv.output || 'output',
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
// Get preset options and merge with CLI args
|
|
198
|
-
const presetOptions = PRESETS.getPresetOptions(presetId, cliArgs)
|
|
199
|
-
|
|
200
|
-
// Build full argument object
|
|
201
|
-
const argument: Arguments = {
|
|
202
|
-
input: presetOptions.input || cliArgs.input,
|
|
203
|
-
readme: presetOptions.input || cliArgs.input,
|
|
204
|
-
output: presetOptions.output || cliArgs.output || 'output',
|
|
205
|
-
format: presetOptions.format || 'json',
|
|
206
|
-
path: argv.p || argv.path,
|
|
207
|
-
key: argv.k || argv.key,
|
|
208
|
-
style: argv.s || argv.style,
|
|
209
|
-
|
|
210
|
-
// Apply preset SCORM settings
|
|
211
|
-
'scorm-organization': presetOptions['scorm-organization'],
|
|
212
|
-
'scorm-masteryScore': presetOptions['scorm-masteryScore'],
|
|
213
|
-
'scorm-typicalDuration': presetOptions['scorm-typicalDuration'],
|
|
214
|
-
'scorm-iframe': presetOptions['scorm-iframe'],
|
|
215
|
-
'scorm-embed': presetOptions['scorm-embed'],
|
|
216
|
-
'scorm-alwaysActive': presetOptions['scorm-alwaysActive'],
|
|
217
|
-
|
|
218
|
-
// IMS cases
|
|
219
|
-
'ims-indexeddb': argv['ims-indexeddb'],
|
|
220
|
-
|
|
221
|
-
// web-cases
|
|
222
|
-
'web-zip': argv['web-zip'],
|
|
223
|
-
'web-indexeddb': argv['web-indexeddb'],
|
|
224
|
-
'web-iframe': argv['web-iframe'],
|
|
225
|
-
|
|
226
|
-
// pdf cases
|
|
227
|
-
'pdf-preview': argv['pdf-preview'],
|
|
228
|
-
'pdf-scale': argv['pdf-scale'],
|
|
229
|
-
'pdf-displayHeaderFooter': argv['pdf-displayHeaderFooter'],
|
|
230
|
-
'pdf-headerTemplate': argv['pdf-headerTemplate'],
|
|
231
|
-
'pdf-footerTemplate': argv['pdf-footerTemplate'],
|
|
232
|
-
'pdf-printBackground': argv['pdf-printBackground'],
|
|
233
|
-
'pdf-landscape': argv['pdf-landscape'],
|
|
234
|
-
'pdf-format': argv['pdf-format'] || 'A4',
|
|
235
|
-
'pdf-width': argv['pdf-width'],
|
|
236
|
-
'pdf-height': argv['pdf-height'],
|
|
237
|
-
'pdf-margin-top': argv['pdf-margin-top'],
|
|
238
|
-
'pdf-margin-bottom': argv['pdf-margin-bottom'],
|
|
239
|
-
'pdf-margin-right': argv['pdf-margin-right'],
|
|
240
|
-
'pdf-margin-left': argv['pdf-margin-left'],
|
|
241
|
-
'pdf-preferCSSPageSize': argv['pdf-preferCSSPageSize'],
|
|
242
|
-
'pdf-omitBackground': argv['pdf-omitBackground'],
|
|
243
|
-
'pdf-timeout': argv['pdf-timeout'],
|
|
244
|
-
'pdf-stylesheet': argv['pdf-stylesheet'],
|
|
245
|
-
'pdf-theme': argv['pdf-theme'],
|
|
246
|
-
|
|
247
|
-
// epub cases
|
|
248
|
-
'epub-title': argv['epub-title'],
|
|
249
|
-
'epub-author': argv['epub-author'],
|
|
250
|
-
'epub-publisher': argv['epub-publisher'],
|
|
251
|
-
'epub-cover': argv['epub-cover'],
|
|
252
|
-
'epub-description': argv['epub-description'],
|
|
253
|
-
'epub-language': argv['epub-language'],
|
|
254
|
-
'epub-version': argv['epub-version'],
|
|
255
|
-
'epub-stylesheet': argv['epub-stylesheet'],
|
|
256
|
-
'epub-theme': argv['epub-theme'],
|
|
257
|
-
'epub-toc-title': argv['epub-toc-title'],
|
|
258
|
-
'epub-hide-toc': argv['epub-hide-toc'],
|
|
259
|
-
'epub-timeout': argv['epub-timeout'],
|
|
260
|
-
'epub-fonts': argv['epub-fonts'],
|
|
261
|
-
'epub-chapter-title': argv['epub-chapter-title'],
|
|
262
|
-
'epub-preview': argv['epub-preview'],
|
|
263
|
-
|
|
264
|
-
// docx cases
|
|
265
|
-
'docx-title': argv['docx-title'],
|
|
266
|
-
'docx-author': argv['docx-author'],
|
|
267
|
-
'docx-subject': argv['docx-subject'],
|
|
268
|
-
'docx-description': argv['docx-description'],
|
|
269
|
-
'docx-language': argv['docx-language'],
|
|
270
|
-
'docx-orientation': argv['docx-orientation'],
|
|
271
|
-
'docx-font': argv['docx-font'],
|
|
272
|
-
'docx-font-size': argv['docx-font-size'],
|
|
273
|
-
'docx-header': argv['docx-header'],
|
|
274
|
-
'docx-header-html': argv['docx-header-html'],
|
|
275
|
-
'docx-footer': argv['docx-footer'],
|
|
276
|
-
'docx-footer-html': argv['docx-footer-html'],
|
|
277
|
-
'docx-page-number': argv['docx-page-number'],
|
|
278
|
-
'docx-stylesheet': argv['docx-stylesheet'],
|
|
279
|
-
'docx-theme': argv['docx-theme'],
|
|
280
|
-
'docx-timeout': argv['docx-timeout'],
|
|
281
|
-
'docx-preview': argv['docx-preview'],
|
|
282
|
-
|
|
283
|
-
'android-sdk': escapeBackslash(argv['android-sdk']),
|
|
284
|
-
'android-appId': argv['android-appId'],
|
|
285
|
-
'android-appName': argv['android-appName'],
|
|
286
|
-
'android-icon': escapeBackslash(argv['android-icon']),
|
|
287
|
-
'android-iconBackgroundColor': argv['android-iconBackgroundColor'],
|
|
288
|
-
'android-iconBackgroundColorDark': argv['android-iconBackgroundColorDark'],
|
|
289
|
-
'android-preview': argv['android-preview'],
|
|
290
|
-
'android-release': argv['android-release'],
|
|
291
|
-
'android-bundle': argv['android-bundle'],
|
|
292
|
-
'android-keystore': escapeBackslash(argv['android-keystore']),
|
|
293
|
-
'android-keystorePassword': argv['android-keystorePassword'],
|
|
294
|
-
'android-keyAlias': argv['android-keyAlias'],
|
|
295
|
-
'android-keyPassword': argv['android-keyPassword'],
|
|
296
|
-
|
|
297
|
-
// project settings
|
|
298
|
-
'project-no-meta': argv['project-no-meta'],
|
|
299
|
-
'project-no-rdf': argv['project-no-rdf'],
|
|
300
|
-
'project-no-categories': argv['project-no-categories'],
|
|
301
|
-
'project-category-blur': argv['project-category-blur'],
|
|
302
|
-
'project-generate-pdf': argv['project-generate-pdf'],
|
|
303
|
-
'project-generate-ims': argv['project-generate-ims'],
|
|
304
|
-
'project-generate-scorm12': argv['project-generate-scorm12'],
|
|
305
|
-
'project-generate-scorm2004': argv['project-generate-scorm2004'],
|
|
306
|
-
'project-generate-android': argv['project-generate-android'],
|
|
307
|
-
'project-generate-cache': argv['project-generate-cache'],
|
|
308
|
-
|
|
309
|
-
// RDF settings
|
|
310
|
-
'rdf-format': argv['rdf-format'],
|
|
311
|
-
'rdf-preview': argv['rdf-preview'],
|
|
312
|
-
'rdf-url': argv['rdf-url'],
|
|
313
|
-
'rdf-type': argv['rdf-type'],
|
|
314
|
-
'rdf-license': argv['rdf-license'],
|
|
315
|
-
'rdf-educationalLevel': argv['rdf-educationalLevel'],
|
|
316
|
-
'rdf-template': argv['rdf-template'],
|
|
317
|
-
|
|
318
|
-
// xAPI settings
|
|
319
|
-
'xapi-endpoint': argv['xapi-endpoint'],
|
|
320
|
-
'xapi-auth': argv['xapi-auth'],
|
|
321
|
-
'xapi-actor': argv['xapi-actor'],
|
|
322
|
-
'xapi-course-id': argv['xapi-course-id'],
|
|
323
|
-
'xapi-course-title': argv['xapi-course-title'],
|
|
324
|
-
'xapi-mastery-threshold': argv['xapi-mastery-threshold'],
|
|
325
|
-
'xapi-progress-threshold': argv['xapi-progress-threshold'],
|
|
326
|
-
'xapi-debug': argv['xapi-debug'],
|
|
327
|
-
'xapi-zip': argv['xapi-zip'],
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
return argument
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* Validates and normalizes parsed arguments
|
|
335
|
-
*/
|
|
336
|
-
export function validateAndNormalize(argument: Arguments): Arguments {
|
|
337
|
-
argument.format = argument.format.toLowerCase()
|
|
338
|
-
|
|
339
|
-
if (argument.format == ANDROID.format) {
|
|
340
|
-
argument['android-sdk'] =
|
|
341
|
-
argument['android-sdk'] ||
|
|
342
|
-
process.env.ANDROID_SDK_ROOT ||
|
|
343
|
-
process.env.ANDROID_HOME
|
|
344
|
-
|
|
345
|
-
if (!argument['android-sdk']) {
|
|
346
|
-
console.warn('Path to SDK has to be defined, you will have to install:')
|
|
347
|
-
console.warn('https://developer.android.com/studio/')
|
|
348
|
-
console.warn(
|
|
349
|
-
'Or set the ANDROID_SDK_ROOT or ANDROID_HOME environment variable.',
|
|
350
|
-
)
|
|
351
|
-
process.exit(1)
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
if (!argument['android-appId']) {
|
|
355
|
-
console.warn('The appId has to provided to uniquely identify your App.')
|
|
356
|
-
console.warn('This can be the URL of your site in reverse order, eg.:')
|
|
357
|
-
console.warn('io.github.liascript')
|
|
358
|
-
process.exit(1)
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
if (!argument.path && !helper.isURL(argument.input)) {
|
|
363
|
-
argument.path = path.dirname(argument.input)
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
if (!argument.path) {
|
|
367
|
-
argument.path = '.'
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
argument.readme = argument.input.replace(argument.path, '.')
|
|
371
|
-
|
|
372
|
-
return argument
|
|
373
|
-
}
|
package/src/presets.yaml
DELETED
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
presets:
|
|
2
|
-
- id: moodle3
|
|
3
|
-
name: Moodle3.x
|
|
4
|
-
logo:
|
|
5
|
-
icon: 🎓
|
|
6
|
-
url: ../assets/moodle.svg
|
|
7
|
-
format: scorm1.2
|
|
8
|
-
subtitle: SCORM 1.2
|
|
9
|
-
description:
|
|
10
|
-
de: >
|
|
11
|
-
Moodle ist das weltweit am häufigsten verwendete Open-Source-Lernmanagementsystem.
|
|
12
|
-
Diese Konfiguration verwendet SCORM 1.2 mit Embed-Modus für Moodle 3.x Kompatibilität.
|
|
13
|
-
<a href='https://moodle.org' target='_blank'>Mehr erfahren</a>
|
|
14
|
-
en: >
|
|
15
|
-
Moodle is the world's most widely used open-source learning management system.
|
|
16
|
-
This configuration uses SCORM 1.2 with embed mode for Moodle 3.x compatibility.
|
|
17
|
-
<a href='https://moodle.org' target='_blank'>Learn more</a>
|
|
18
|
-
options:
|
|
19
|
-
# SCORM-spezifische Einstellungen
|
|
20
|
-
responsiveVoice: false
|
|
21
|
-
translateWithGoogle: false
|
|
22
|
-
debugging: false
|
|
23
|
-
removeBase: false
|
|
24
|
-
scormOrganization: ""
|
|
25
|
-
typicalDuration: "PT0H5M0S"
|
|
26
|
-
scormIframe: true
|
|
27
|
-
scormEmbed: false # Empfohlen für Moodle 4
|
|
28
|
-
format: scorm1.2
|
|
29
|
-
|
|
30
|
-
- id: moodle4
|
|
31
|
-
name: Moodle4.x
|
|
32
|
-
logo:
|
|
33
|
-
icon: 🎓
|
|
34
|
-
url: ../assets/moodle.svg
|
|
35
|
-
format: scorm1.2
|
|
36
|
-
subtitle: SCORM 1.2
|
|
37
|
-
description:
|
|
38
|
-
de: >
|
|
39
|
-
Moodle ist das weltweit am häufigsten verwendete Open-Source-Lernmanagementsystem.
|
|
40
|
-
Diese Konfiguration verwendet SCORM 1.2 mit Embed-Modus für Moodle 4.x Kompatibilität.
|
|
41
|
-
<a href='https://moodle.org' target='_blank'>Mehr erfahren</a>
|
|
42
|
-
en: >
|
|
43
|
-
Moodle is the world's most widely used open-source learning management system.
|
|
44
|
-
This configuration uses SCORM 1.2 with embed mode for Moodle 4.x compatibility.
|
|
45
|
-
<a href='https://moodle.org' target='_blank'>Learn more</a>
|
|
46
|
-
options:
|
|
47
|
-
# SCORM-spezifische Einstellungen
|
|
48
|
-
responsiveVoice: false
|
|
49
|
-
translateWithGoogle: false
|
|
50
|
-
debugging: false
|
|
51
|
-
removeBase: false
|
|
52
|
-
scormOrganization: ""
|
|
53
|
-
typicalDuration: "PT0H5M0S"
|
|
54
|
-
scormIframe: false
|
|
55
|
-
scormEmbed: true # Empfohlen für Moodle 4
|
|
56
|
-
format: scorm1.2
|
|
57
|
-
|
|
58
|
-
- id: ilias
|
|
59
|
-
name: ILIAS
|
|
60
|
-
logo:
|
|
61
|
-
icon: 📚
|
|
62
|
-
url: ../assets/ilias.png
|
|
63
|
-
format: scorm1.2
|
|
64
|
-
subtitle: SCORM 1.2
|
|
65
|
-
description:
|
|
66
|
-
de: >
|
|
67
|
-
ILIAS ist ein leistungsstarkes Open-Source-LMS aus Deutschland.
|
|
68
|
-
Diese Konfiguration nutzt SCORM 1.2 für bestmögliche Kompatibilität mit ILIAS-Versionen.
|
|
69
|
-
<a href='https://www.ilias.de' target='_blank'>Mehr erfahren</a>
|
|
70
|
-
en: >
|
|
71
|
-
ILIAS is a powerful open-source LMS from Germany.
|
|
72
|
-
This configuration uses SCORM 1.2 for best compatibility with ILIAS versions.
|
|
73
|
-
<a href='https://www.ilias.de' target='_blank'>Learn more</a>
|
|
74
|
-
options:
|
|
75
|
-
responsiveVoice: false
|
|
76
|
-
translateWithGoogle: false
|
|
77
|
-
debugging: false
|
|
78
|
-
removeBase: false
|
|
79
|
-
scormOrganization: ""
|
|
80
|
-
typicalDuration: "PT0H5M0S"
|
|
81
|
-
scormIframe: true # Oft besser für ILIAS
|
|
82
|
-
scormEmbed: false
|
|
83
|
-
format: scorm1.2
|
|
84
|
-
|
|
85
|
-
- id: opal
|
|
86
|
-
name: OPAL
|
|
87
|
-
logo:
|
|
88
|
-
icon: 🏛️
|
|
89
|
-
url: ../assets/opal.png
|
|
90
|
-
format: scorm2004
|
|
91
|
-
subtitle: SCORM 2004
|
|
92
|
-
description:
|
|
93
|
-
de: >
|
|
94
|
-
OPAL (Online-Plattform für Akademisches Lehren und Lernen) ist das zentrale LMS
|
|
95
|
-
für sächsische Hochschulen. Optimiert für SCORM 2004.
|
|
96
|
-
<a href='https://bildungsportal.sachsen.de/opal' target='_blank'>Mehr erfahren</a>
|
|
97
|
-
en: >
|
|
98
|
-
OPAL (Online Platform for Academic Teaching and Learning) is the central LMS
|
|
99
|
-
for Saxon universities. Optimized for SCORM 2004.
|
|
100
|
-
<a href='https://bildungsportal.sachsen.de/opal' target='_blank'>Learn more</a>
|
|
101
|
-
options:
|
|
102
|
-
responsiveVoice: false
|
|
103
|
-
translateWithGoogle: false
|
|
104
|
-
debugging: false
|
|
105
|
-
removeBase: false
|
|
106
|
-
scormOrganization: ""
|
|
107
|
-
typicalDuration: "PT0H5M0S"
|
|
108
|
-
scormIframe: false
|
|
109
|
-
scormEmbed: false
|
|
110
|
-
format: scorm2004
|
|
111
|
-
|
|
112
|
-
- id: scormCloud
|
|
113
|
-
name: ScormCloud
|
|
114
|
-
logo:
|
|
115
|
-
icon: 🌩️
|
|
116
|
-
url: ../assets/scorm.png
|
|
117
|
-
format: scorm2004
|
|
118
|
-
subtitle: SCORM 2004
|
|
119
|
-
description:
|
|
120
|
-
de: >
|
|
121
|
-
ScormCloud ist eine kommerzielle SCORM-Hosting-Plattform, die von Rustici Software betrieben wird.
|
|
122
|
-
Diese Konfiguration bietet universelle SCORM 2004 Einstellungen für maximale Kompatibilität.
|
|
123
|
-
<a href='https://scorm.com/scorm-solved/scorm-cloud-features/' target='_blank'>Mehr erfahren</a>
|
|
124
|
-
en: >
|
|
125
|
-
ScormCloud is a commercial SCORM hosting platform operated by Rustici Software.
|
|
126
|
-
This configuration provides universal SCORM 2004 settings for maximum compatibility.
|
|
127
|
-
<a href='https://scorm.com/scorm-solved/scorm-cloud-features/' target='_blank'>Learn more</a>
|
|
128
|
-
options:
|
|
129
|
-
responsiveVoice: false
|
|
130
|
-
translateWithGoogle: false
|
|
131
|
-
debugging: false
|
|
132
|
-
removeBase: false
|
|
133
|
-
scormOrganization: ""
|
|
134
|
-
typicalDuration: "PT0H5M0S"
|
|
135
|
-
scormIframe: false
|
|
136
|
-
scormEmbed: false
|
|
137
|
-
format: scorm2004
|
|
138
|
-
|
|
139
|
-
- id: openolat
|
|
140
|
-
name: OpenOlat
|
|
141
|
-
logo:
|
|
142
|
-
icon: 🔓
|
|
143
|
-
url: ../assets/openolat.png
|
|
144
|
-
format: scorm1.2
|
|
145
|
-
subtitle: SCORM 1.2
|
|
146
|
-
description:
|
|
147
|
-
de: >
|
|
148
|
-
OpenOlat ist eine Open-Source E-Learning-Plattform aus der Schweiz.
|
|
149
|
-
Diese Konfiguration nutzt SCORM 1.2 für volle Funktionalität.
|
|
150
|
-
<a href='https://www.openolat.com' target='_blank'>Mehr erfahren</a>
|
|
151
|
-
en: >
|
|
152
|
-
OpenOlat is an open-source e-learning platform from Switzerland.
|
|
153
|
-
This configuration uses SCORM 1.2 for full functionality.
|
|
154
|
-
<a href='https://www.openolat.com' target='_blank'>Learn more</a>
|
|
155
|
-
options:
|
|
156
|
-
responsiveVoice: false
|
|
157
|
-
translateWithGoogle: false
|
|
158
|
-
debugging: false
|
|
159
|
-
removeBase: false
|
|
160
|
-
scormOrganization: ""
|
|
161
|
-
typicalDuration: "PT0H5M0S"
|
|
162
|
-
scormIframe: false
|
|
163
|
-
scormEmbed: true
|
|
164
|
-
format: scorm1.2
|
|
165
|
-
|
|
166
|
-
- id: openedx
|
|
167
|
-
name: Open edX
|
|
168
|
-
logo:
|
|
169
|
-
icon: 🎯
|
|
170
|
-
url: ../assets/edx.svg
|
|
171
|
-
format: scorm2004
|
|
172
|
-
subtitle: SCORM 2004
|
|
173
|
-
description:
|
|
174
|
-
de: >
|
|
175
|
-
Open edX ist die Open-Source-Plattform hinter edX.org und wird weltweit für MOOCs eingesetzt.
|
|
176
|
-
Verwendet SCORM 2004 über das SCORM XBlock.
|
|
177
|
-
<a href='https://openedx.org' target='_blank'>Mehr erfahren</a>
|
|
178
|
-
en: >
|
|
179
|
-
Open edX is the open-source platform behind edX.org and is used worldwide for MOOCs.
|
|
180
|
-
Uses SCORM 2004 via the SCORM XBlock.
|
|
181
|
-
<a href='https://openedx.org' target='_blank'>Learn more</a>
|
|
182
|
-
options:
|
|
183
|
-
responsiveVoice: false
|
|
184
|
-
translateWithGoogle: false
|
|
185
|
-
debugging: false
|
|
186
|
-
removeBase: false
|
|
187
|
-
scormOrganization: ""
|
|
188
|
-
typicalDuration: "PT0H5M0S"
|
|
189
|
-
scormIframe: true # Oft erforderlich für Open edX
|
|
190
|
-
scormEmbed: false
|
|
191
|
-
format: scorm2004
|
|
192
|
-
|
|
193
|
-
- id: learnworlds
|
|
194
|
-
name: LearnWorlds
|
|
195
|
-
logo:
|
|
196
|
-
icon: 🌍
|
|
197
|
-
url: ../assets/learnworlds.png
|
|
198
|
-
format: scorm2004
|
|
199
|
-
subtitle: SCORM 2004
|
|
200
|
-
description:
|
|
201
|
-
de: >
|
|
202
|
-
LearnWorlds ist eine moderne Cloud-basierte Lernplattform für Online-Kursanbieter.
|
|
203
|
-
Diese Konfiguration nutzt SCORM 2004 mit Iframe-Modus und masteryScore für beste Kompatibilität.
|
|
204
|
-
<a href='https://www.learnworlds.com' target='_blank'>Mehr erfahren</a>
|
|
205
|
-
en: >
|
|
206
|
-
LearnWorlds is a modern cloud-based learning platform for online course providers.
|
|
207
|
-
This configuration uses SCORM 2004 with iframe mode and masteryScore for best compatibility.
|
|
208
|
-
<a href='https://www.learnworlds.com' target='_blank'>Learn more</a>
|
|
209
|
-
options:
|
|
210
|
-
responsiveVoice: false
|
|
211
|
-
translateWithGoogle: false
|
|
212
|
-
debugging: false
|
|
213
|
-
removeBase: false
|
|
214
|
-
scormOrganization: ""
|
|
215
|
-
typicalDuration: "PT0H5M0S"
|
|
216
|
-
scormIframe: true
|
|
217
|
-
scormEmbed: false
|
|
218
|
-
masteryScore: 80
|
|
219
|
-
format: scorm2004
|
package/src/types.ts
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Supported export formats
|
|
3
|
-
*/
|
|
4
|
-
export enum ExportFormat {
|
|
5
|
-
JSON = 'json',
|
|
6
|
-
FULL_JSON = 'fulljson',
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Helper port commands
|
|
11
|
-
*/
|
|
12
|
-
export enum HelperCommand {
|
|
13
|
-
DEBUG = 'debug',
|
|
14
|
-
FILE = 'file',
|
|
15
|
-
TEMPLATE = 'template',
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Elm Worker interface
|
|
20
|
-
*/
|
|
21
|
-
export interface ElmWorker {
|
|
22
|
-
init: (options: { flags: { cmd: string } }) => ElmApp
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Elm Application interface
|
|
27
|
-
*/
|
|
28
|
-
export interface ElmApp {
|
|
29
|
-
ports: ElmPorts
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Elm ports for communication
|
|
34
|
-
*/
|
|
35
|
-
export interface ElmPorts {
|
|
36
|
-
helper: {
|
|
37
|
-
subscribe: (callback: (data: [string, string]) => void) => void
|
|
38
|
-
}
|
|
39
|
-
output: {
|
|
40
|
-
subscribe: (callback: (event: [boolean, string]) => void) => void
|
|
41
|
-
}
|
|
42
|
-
input: {
|
|
43
|
-
send: (data: [string, string] | [string, string, string]) => void
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Project collection structure for multi-course exports
|
|
49
|
-
*/
|
|
50
|
-
export interface ProjectCollection {
|
|
51
|
-
[key: string]: unknown
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Preset configuration structure
|
|
56
|
-
*/
|
|
57
|
-
export interface PresetOptions {
|
|
58
|
-
format?: string
|
|
59
|
-
responsiveVoice?: boolean
|
|
60
|
-
translateWithGoogle?: boolean
|
|
61
|
-
debugging?: boolean
|
|
62
|
-
removeBase?: boolean
|
|
63
|
-
scormOrganization?: string
|
|
64
|
-
typicalDuration?: string
|
|
65
|
-
scormIframe?: boolean
|
|
66
|
-
scormEmbed?: boolean
|
|
67
|
-
[key: string]: any
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export interface Preset {
|
|
71
|
-
id: string
|
|
72
|
-
name: string
|
|
73
|
-
logo: string
|
|
74
|
-
format: string
|
|
75
|
-
subtitle: string
|
|
76
|
-
description: string
|
|
77
|
-
options: PresetOptions
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export interface PresetsConfig {
|
|
81
|
-
presets: Preset[]
|
|
82
|
-
}
|