@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/electron-builder.json
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"productName": "LiaScript-Exporter",
|
|
3
|
-
"appId": "org.liascript.exporter",
|
|
4
|
-
"electronLanguages": ["en"],
|
|
5
|
-
"directories": {
|
|
6
|
-
"output": "release",
|
|
7
|
-
"buildResources": "electron/build"
|
|
8
|
-
},
|
|
9
|
-
"files": [
|
|
10
|
-
"dist/**/*",
|
|
11
|
-
"!dist/electron/**/*",
|
|
12
|
-
"src/**/*",
|
|
13
|
-
"LiaScript/resources/**/*",
|
|
14
|
-
"package.json",
|
|
15
|
-
"tsconfig.json",
|
|
16
|
-
{
|
|
17
|
-
"from": "electron",
|
|
18
|
-
"to": "electron",
|
|
19
|
-
"filter": ["**/*.js", "!**/*.ts"]
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
"extraMetadata": {
|
|
23
|
-
"main": "electron/main.js"
|
|
24
|
-
},
|
|
25
|
-
"extraResources": [
|
|
26
|
-
{
|
|
27
|
-
"from": "dist/assets",
|
|
28
|
-
"to": "assets"
|
|
29
|
-
}
|
|
30
|
-
],
|
|
31
|
-
"mac": {
|
|
32
|
-
"category": "public.app-category.education",
|
|
33
|
-
"icon": "electron/build/icons/mac/icon.icns",
|
|
34
|
-
"target": [
|
|
35
|
-
{
|
|
36
|
-
"target": "dmg",
|
|
37
|
-
"arch": ["x64", "arm64"]
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"target": "zip",
|
|
41
|
-
"arch": ["x64", "arm64"]
|
|
42
|
-
}
|
|
43
|
-
],
|
|
44
|
-
"darkModeSupport": true,
|
|
45
|
-
"hardenedRuntime": true,
|
|
46
|
-
"gatekeeperAssess": false,
|
|
47
|
-
"entitlements": "electron/build/entitlements.mac.plist",
|
|
48
|
-
"entitlementsInherit": "electron/build/entitlements.mac.plist"
|
|
49
|
-
},
|
|
50
|
-
"dmg": {
|
|
51
|
-
"contents": [
|
|
52
|
-
{
|
|
53
|
-
"x": 130,
|
|
54
|
-
"y": 220
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"x": 410,
|
|
58
|
-
"y": 220,
|
|
59
|
-
"type": "link",
|
|
60
|
-
"path": "/Applications"
|
|
61
|
-
}
|
|
62
|
-
],
|
|
63
|
-
"window": {
|
|
64
|
-
"width": 540,
|
|
65
|
-
"height": 400
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
"win": {
|
|
69
|
-
"icon": "electron/build/icons/win/icon.ico",
|
|
70
|
-
"target": [
|
|
71
|
-
{
|
|
72
|
-
"target": "nsis",
|
|
73
|
-
"arch": ["x64", "ia32"]
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"target": "zip",
|
|
77
|
-
"arch": ["x64"]
|
|
78
|
-
}
|
|
79
|
-
],
|
|
80
|
-
"publisherName": "LiaScript",
|
|
81
|
-
"verifyUpdateCodeSignature": false
|
|
82
|
-
},
|
|
83
|
-
"nsis": {
|
|
84
|
-
"oneClick": false,
|
|
85
|
-
"allowToChangeInstallationDirectory": true,
|
|
86
|
-
"createDesktopShortcut": true,
|
|
87
|
-
"createStartMenuShortcut": true,
|
|
88
|
-
"shortcutName": "LiaScript Exporter",
|
|
89
|
-
"perMachine": false,
|
|
90
|
-
"deleteAppDataOnUninstall": false,
|
|
91
|
-
"installerIcon": "electron/build/icons/win/icon.ico",
|
|
92
|
-
"uninstallerIcon": "electron/build/icons/win/icon.ico"
|
|
93
|
-
},
|
|
94
|
-
"linux": {
|
|
95
|
-
"icon": "electron/build/icons",
|
|
96
|
-
"category": "Education",
|
|
97
|
-
"target": [
|
|
98
|
-
{
|
|
99
|
-
"target": "AppImage",
|
|
100
|
-
"arch": ["x64"]
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
"target": "deb",
|
|
104
|
-
"arch": ["x64"]
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"target": "rpm",
|
|
108
|
-
"arch": ["x64"]
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
"target": "tar.gz",
|
|
112
|
-
"arch": ["x64"]
|
|
113
|
-
}
|
|
114
|
-
],
|
|
115
|
-
"executableName": "liascript-exporter",
|
|
116
|
-
"artifactName": "${name}-${version}.${ext}",
|
|
117
|
-
"desktop": {
|
|
118
|
-
"Name": "LiaScript Exporter",
|
|
119
|
-
"Comment": "Export LiaScript courses to various formats",
|
|
120
|
-
"GenericName": "Educational Content Exporter",
|
|
121
|
-
"Categories": "Education;Development;",
|
|
122
|
-
"MimeType": "x-scheme-handler/liascript;",
|
|
123
|
-
"StartupWMClass": "LiaScript-Exporter"
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
"appImage": {
|
|
127
|
-
"license": "LICENSE",
|
|
128
|
-
"artifactName": "${productName}-${version}.${ext}"
|
|
129
|
-
},
|
|
130
|
-
"deb": {
|
|
131
|
-
"depends": ["libgtk-3-0", "libnotify4", "libnss3", "libxtst6", "xdg-utils", "libatspi2.0-0", "libdrm2", "libgbm1", "libxcb-dri3-0"],
|
|
132
|
-
"packageName": "liascript-exporter"
|
|
133
|
-
},
|
|
134
|
-
"publish": {
|
|
135
|
-
"provider": "github",
|
|
136
|
-
"owner": "LiaScript",
|
|
137
|
-
"repo": "LiaScript-Exporter"
|
|
138
|
-
},
|
|
139
|
-
"afterPack": "./electron/scripts/after-pack.js",
|
|
140
|
-
"compression": "normal",
|
|
141
|
-
"asar": true,
|
|
142
|
-
"asarUnpack": [
|
|
143
|
-
"node_modules/**/*",
|
|
144
|
-
"src/**/*",
|
|
145
|
-
"tsconfig.json",
|
|
146
|
-
"dist/**/*",
|
|
147
|
-
"electron/**/*"
|
|
148
|
-
]
|
|
149
|
-
}
|
package/src/cli.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import * as COLOR from './colorize'
|
|
2
|
-
import * as SCORM12 from './export/scorm12'
|
|
3
|
-
import * as IMS from './export/ims'
|
|
4
|
-
import * as ANDROID from './export/android'
|
|
5
|
-
import * as PDF from './export/pdf'
|
|
6
|
-
import * as EPUB from './export/epub'
|
|
7
|
-
import * as DOCX from './export/docx'
|
|
8
|
-
import * as PROJECT from './export/project'
|
|
9
|
-
import * as RDF from './export/rdf'
|
|
10
|
-
import * as XAPI from './export/xapi'
|
|
11
|
-
import * as PRESETS from './export/presets'
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Displays comprehensive help information for all export formats
|
|
15
|
-
*/
|
|
16
|
-
export function displayHelp(): void {
|
|
17
|
-
console.log(COLOR.heading('LiaScript-Exporter'))
|
|
18
|
-
console.log('')
|
|
19
|
-
COLOR.info(
|
|
20
|
-
'Export your LiaScript Markdown files to different formats. You can either use the serve option in order to have a nice UI or use the commandline options below. Based on the selected output format, additional options can be used.',
|
|
21
|
-
)
|
|
22
|
-
console.log('')
|
|
23
|
-
|
|
24
|
-
console.log(COLOR.heading('Server:'))
|
|
25
|
-
COLOR.command(
|
|
26
|
-
'serve',
|
|
27
|
-
'[--port PORT]',
|
|
28
|
-
'Start the export server with web interface (default port: 3000)',
|
|
29
|
-
)
|
|
30
|
-
|
|
31
|
-
console.log('')
|
|
32
|
-
console.log(COLOR.heading('CLI - Commands:\n'))
|
|
33
|
-
|
|
34
|
-
COLOR.command('-h', '--help', 'show this help')
|
|
35
|
-
COLOR.command('-i', '--input', 'file to be used as input')
|
|
36
|
-
COLOR.command(
|
|
37
|
-
'-p',
|
|
38
|
-
'--path',
|
|
39
|
-
'path to be packed, if not set, the path of the input file is used',
|
|
40
|
-
)
|
|
41
|
-
COLOR.command(
|
|
42
|
-
'-o',
|
|
43
|
-
'--output',
|
|
44
|
-
'output file name (default is output), the ending is define by the format',
|
|
45
|
-
)
|
|
46
|
-
COLOR.command(
|
|
47
|
-
'-s',
|
|
48
|
-
'--style',
|
|
49
|
-
'additional styling to passed to the export, can be used for fixes, such as "height: 100vh; width: 100%; border: 2px;"',
|
|
50
|
-
)
|
|
51
|
-
COLOR.command(
|
|
52
|
-
'-f',
|
|
53
|
-
'--format',
|
|
54
|
-
'scorm1.2, scorm2004, json, fullJson, web, ims, pdf, epub, docx, android, linkedData, presets (default is json)',
|
|
55
|
-
)
|
|
56
|
-
COLOR.command('-v', '--version', 'output the current version')
|
|
57
|
-
COLOR.command('\n-k', '--key', 'responsive voice key ')
|
|
58
|
-
|
|
59
|
-
PRESETS.help()
|
|
60
|
-
SCORM12.help()
|
|
61
|
-
IMS.help()
|
|
62
|
-
ANDROID.help()
|
|
63
|
-
PDF.help()
|
|
64
|
-
EPUB.help()
|
|
65
|
-
DOCX.help()
|
|
66
|
-
PROJECT.help()
|
|
67
|
-
RDF.help()
|
|
68
|
-
XAPI.help()
|
|
69
|
-
}
|
package/src/colorize.ts
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
const GREEN = '\x1b[32m' // For short options (-h)
|
|
2
|
-
const CYAN = '\x1b[36m' // For long options (--help)
|
|
3
|
-
const YELLOW = '\x1b[33m' // Could be used for parameter values
|
|
4
|
-
const RESET = '\x1b[0m' // Reset to default color
|
|
5
|
-
|
|
6
|
-
export function short(text: string): string {
|
|
7
|
-
return `${GREEN}${text}${RESET}`
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function long(text: string): string {
|
|
11
|
-
return `${CYAN}${text}${RESET}`
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export function heading(text: string): string {
|
|
15
|
-
return underline(bold(`${YELLOW}${text}${RESET}`))
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export function bold(text: string): string {
|
|
19
|
-
return `\x1b[1m${text}${RESET}`
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function italic(text: string): string {
|
|
23
|
-
return `\x1b[3m${text}${RESET}`
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export function underline(text: string): string {
|
|
27
|
-
return `\x1b[4m${text}${RESET}`
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export function command(
|
|
31
|
-
short_command: string | null,
|
|
32
|
-
long_command: string,
|
|
33
|
-
description: string,
|
|
34
|
-
indentation: number = 28
|
|
35
|
-
): undefined {
|
|
36
|
-
// Format the command portion
|
|
37
|
-
let commandPart = ''
|
|
38
|
-
|
|
39
|
-
if (short_command) {
|
|
40
|
-
// Handle newline character if present in short_command
|
|
41
|
-
if (short_command.includes('\n')) {
|
|
42
|
-
commandPart =
|
|
43
|
-
short(short_command.replace('\n', '')) + ' ' + bold(long(long_command))
|
|
44
|
-
} else {
|
|
45
|
-
commandPart = short(short_command) + ' ' + bold(long(long_command))
|
|
46
|
-
}
|
|
47
|
-
} else {
|
|
48
|
-
commandPart = bold(long(long_command))
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// Get the visible length of the command part (without ANSI codes)
|
|
52
|
-
const commandPartLength = commandPart.replace(/\x1b\[\d+m/g, '').length
|
|
53
|
-
|
|
54
|
-
// Calculate indentation padding
|
|
55
|
-
const padding = Math.max(0, indentation - commandPartLength)
|
|
56
|
-
|
|
57
|
-
// Calculate available space for description after indentation
|
|
58
|
-
const maxLineLength = 80 // Standard terminal width
|
|
59
|
-
const wrapLength = maxLineLength - indentation
|
|
60
|
-
|
|
61
|
-
// Word wrap the description
|
|
62
|
-
const words = description.split(' ')
|
|
63
|
-
let lines = []
|
|
64
|
-
let currentLine = ''
|
|
65
|
-
|
|
66
|
-
for (const word of words) {
|
|
67
|
-
if ((currentLine + word).length > wrapLength && currentLine.length > 0) {
|
|
68
|
-
lines.push(currentLine.trim())
|
|
69
|
-
currentLine = word + ' '
|
|
70
|
-
} else {
|
|
71
|
-
currentLine += word + ' '
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
if (currentLine.trim().length > 0) {
|
|
76
|
-
lines.push(currentLine.trim())
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// Output first line with proper indentation
|
|
80
|
-
console.log(commandPart + ' '.repeat(padding) + lines[0])
|
|
81
|
-
|
|
82
|
-
// Output additional lines with consistent indentation
|
|
83
|
-
for (let i = 1; i < lines.length; i++) {
|
|
84
|
-
console.log(' '.repeat(indentation) + lines[i])
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export function info(text: string, indentation: number = 0): void {
|
|
89
|
-
// Calculate maximum line length
|
|
90
|
-
const maxLineLength = 80
|
|
91
|
-
const wrapLength = maxLineLength - indentation
|
|
92
|
-
|
|
93
|
-
// Word wrap the text
|
|
94
|
-
const words = text.split(' ')
|
|
95
|
-
let lines = []
|
|
96
|
-
let currentLine = ''
|
|
97
|
-
|
|
98
|
-
for (const word of words) {
|
|
99
|
-
if ((currentLine + word).length > wrapLength && currentLine.length > 0) {
|
|
100
|
-
lines.push(currentLine.trim())
|
|
101
|
-
currentLine = word + ' '
|
|
102
|
-
} else {
|
|
103
|
-
currentLine += word + ' '
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (currentLine.trim().length > 0) {
|
|
108
|
-
lines.push(currentLine.trim())
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// Print each line with indentation and styling
|
|
112
|
-
for (let i = 0; i < lines.length; i++) {
|
|
113
|
-
console.log(' '.repeat(indentation) + italic(lines[i]))
|
|
114
|
-
}
|
|
115
|
-
}
|