@liascript/exporter 2.6.44--0.17.7 → 2.6.44--0.17.8
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.7c29f1f8.js → index.77092ea5.js} +2 -2
- package/dist/assets/capacitor/{index.ac58c346.js → index.7c990c90.js} +2 -2
- package/dist/assets/{scorm2004/index.3855b56a.css → capacitor/index.d32274ee.css} +1 -1
- package/dist/assets/capacitor/index.html +1 -1
- package/dist/assets/indexeddb/index.338caa69.js +1 -0
- package/dist/assets/{xapi/index.d1b052a6.js → indexeddb/index.37fff01c.js} +1 -1
- package/dist/assets/{capacitor/index.3855b56a.css → indexeddb/index.d32274ee.css} +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/pdf/index.2a155247.js +1 -0
- package/dist/assets/pdf/{index.c81a848e.css → index.d4376f7a.css} +1 -1
- package/dist/assets/pdf/index.f1056b07.js +1 -0
- package/dist/assets/pdf/index.html +1 -1
- package/dist/assets/scorm1.2/index.4459769d.js +1 -0
- package/dist/assets/scorm1.2/index.472f9b84.js +1 -0
- package/dist/assets/scorm1.2/{index.3855b56a.css → index.d32274ee.css} +1 -1
- package/dist/assets/scorm1.2/index.html +1 -1
- package/dist/assets/{web/jszip.min.63142cc8.js → scorm1.2/jszip.min.4fbcc13f.js} +1 -1
- package/dist/assets/scorm2004/index.88bf9b7c.js +1 -0
- package/dist/assets/scorm2004/index.93c61dcb.js +1 -0
- package/dist/assets/{indexeddb/index.3855b56a.css → scorm2004/index.d32274ee.css} +1 -1
- package/dist/assets/scorm2004/index.html +1 -1
- package/dist/assets/web/index.2d3e116d.js +1 -0
- package/dist/assets/web/index.99fe9bd1.js +1 -0
- package/dist/assets/web/index.d32274ee.css +1 -0
- package/dist/assets/web/index.html +1 -1
- package/dist/assets/{scorm1.2/jszip.min.63142cc8.js → web/jszip.min.4fbcc13f.js} +1 -1
- package/dist/assets/web/{jszip.min.19c66d77.js → jszip.min.eaecf580.js} +1 -1
- package/dist/assets/xapi/index.bceeb4a9.js +1 -0
- package/dist/assets/xapi/index.cdc6535a.js +1 -0
- package/dist/assets/xapi/index.d32274ee.css +1 -0
- package/dist/assets/xapi/index.html +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -1
- package/.github/workflows/test-action.yml +0 -231
- package/action/README.md +0 -263
- package/action/dist/action.js +0 -293
- package/action/dist/index.js +0 -28372
- package/action/dist/inputs.js +0 -173
- package/action/dist/utils.js +0 -320
- package/action/examples/matrix-build.yml +0 -64
- package/action/examples/multi-course.yml +0 -39
- package/action/examples/single-course.yml +0 -42
- package/action/package-lock.json +0 -5286
- package/action/package.json +0 -32
- package/action/src/action.ts +0 -306
- package/action/src/inputs.ts +0 -237
- package/action/src/utils.ts +0 -314
- package/action/tsconfig.json +0 -32
- package/dist/assets/indexeddb/index.08d2ff9e.js +0 -1
- package/dist/assets/indexeddb/index.0b473014.js +0 -1
- package/dist/assets/pdf/index.736768e2.js +0 -1
- package/dist/assets/pdf/index.7c8f0682.js +0 -1
- package/dist/assets/scorm1.2/index.c9f06556.js +0 -1
- package/dist/assets/scorm1.2/index.f31e5689.js +0 -1
- package/dist/assets/scorm2004/index.42e8223c.js +0 -1
- package/dist/assets/scorm2004/index.773e56c6.js +0 -1
- package/dist/assets/web/index.2913fc8a.js +0 -1
- package/dist/assets/web/index.3855b56a.css +0 -1
- package/dist/assets/web/index.4b421cf7.js +0 -1
- package/dist/assets/xapi/index.0ef29ba3.js +0 -1
- package/dist/assets/xapi/index.3855b56a.css +0 -1
- /package/dist/assets/{scorm1.2 → capacitor}/jszip.min.eaecf580.js +0 -0
- /package/dist/assets/{capacitor → scorm1.2}/jszip.min.19c66d77.js +0 -0
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -25,7 +25,7 @@ import fetch from 'node-fetch'
|
|
|
25
25
|
|
|
26
26
|
// -------------------------------Main Execution-------------------------------
|
|
27
27
|
if (argv.v || argv.version) {
|
|
28
|
-
console.log('version: 2.6.44--0.17.
|
|
28
|
+
console.log('version: 2.6.44--0.17.8')
|
|
29
29
|
} else if (argv.h || argv.help) {
|
|
30
30
|
help()
|
|
31
31
|
} else if (argv.i || argv.input) {
|
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
name: Test All Action Capabilities
|
|
2
|
-
on: [push]
|
|
3
|
-
|
|
4
|
-
jobs:
|
|
5
|
-
test-action:
|
|
6
|
-
runs-on: ubuntu-latest
|
|
7
|
-
|
|
8
|
-
steps:
|
|
9
|
-
- uses: actions/checkout@v4
|
|
10
|
-
|
|
11
|
-
- name: Checkout LiaScript docs
|
|
12
|
-
uses: actions/checkout@v4
|
|
13
|
-
with:
|
|
14
|
-
repository: LiaScript/docs
|
|
15
|
-
path: docs
|
|
16
|
-
|
|
17
|
-
# Test SCORM 1.2 with all settings
|
|
18
|
-
- name: Export to SCORM 1.2 (Full Settings)
|
|
19
|
-
id: export-scorm12
|
|
20
|
-
uses: ./
|
|
21
|
-
with:
|
|
22
|
-
input-file: 'docs/README.md'
|
|
23
|
-
format: 'scorm1.2'
|
|
24
|
-
output-name: 'test-scorm12-full'
|
|
25
|
-
scorm-organization: 'Test Organization'
|
|
26
|
-
scorm-mastery-score: '85'
|
|
27
|
-
scorm-typical-duration: 'PT1H30M0S'
|
|
28
|
-
scorm-iframe: true
|
|
29
|
-
scorm-embed: true
|
|
30
|
-
scorm-always-active: true
|
|
31
|
-
|
|
32
|
-
# Test SCORM 2004
|
|
33
|
-
- name: Export to SCORM 2004
|
|
34
|
-
id: export-scorm2004
|
|
35
|
-
uses: ./
|
|
36
|
-
with:
|
|
37
|
-
input-file: 'docs/README.md'
|
|
38
|
-
format: 'scorm2004'
|
|
39
|
-
output-name: 'test-scorm2004'
|
|
40
|
-
scorm-organization: 'Test Organization'
|
|
41
|
-
scorm-mastery-score: '75'
|
|
42
|
-
|
|
43
|
-
# Test PDF with custom settings
|
|
44
|
-
- name: Export to PDF (Custom Settings)
|
|
45
|
-
id: export-pdf
|
|
46
|
-
uses: ./
|
|
47
|
-
with:
|
|
48
|
-
input-file: 'docs/README.md'
|
|
49
|
-
format: 'pdf'
|
|
50
|
-
output-name: 'test-pdf-custom'
|
|
51
|
-
pdf-theme: 'blue'
|
|
52
|
-
pdf-format: 'A4'
|
|
53
|
-
pdf-scale: '1.2'
|
|
54
|
-
pdf-landscape: true
|
|
55
|
-
pdf-print-background: true
|
|
56
|
-
|
|
57
|
-
# Test Web export with all settings
|
|
58
|
-
- name: Export to Web
|
|
59
|
-
id: export-web
|
|
60
|
-
uses: ./
|
|
61
|
-
with:
|
|
62
|
-
input-file: 'docs/README.md'
|
|
63
|
-
format: 'web'
|
|
64
|
-
output-name: 'test-web'
|
|
65
|
-
web-zip: true
|
|
66
|
-
web-indexeddb: true
|
|
67
|
-
web-iframe: true
|
|
68
|
-
|
|
69
|
-
# Test IMS package
|
|
70
|
-
- name: Export to IMS
|
|
71
|
-
id: export-ims
|
|
72
|
-
uses: ./
|
|
73
|
-
with:
|
|
74
|
-
input-file: 'docs/README.md'
|
|
75
|
-
format: 'ims'
|
|
76
|
-
output-name: 'test-ims'
|
|
77
|
-
ims-indexeddb: true
|
|
78
|
-
|
|
79
|
-
# Test xAPI package
|
|
80
|
-
- name: Export to xAPI
|
|
81
|
-
id: export-xapi
|
|
82
|
-
uses: ./
|
|
83
|
-
with:
|
|
84
|
-
input-file: 'docs/README.md'
|
|
85
|
-
format: 'xapi'
|
|
86
|
-
output-name: 'test-xapi'
|
|
87
|
-
xapi-course-id: 'test-course-123'
|
|
88
|
-
xapi-course-title: 'Test Course Title'
|
|
89
|
-
xapi-debug: true
|
|
90
|
-
xapi-zip: true
|
|
91
|
-
|
|
92
|
-
# Test RDF export
|
|
93
|
-
- name: Export to RDF (JSON-LD)
|
|
94
|
-
id: export-rdf-jsonld
|
|
95
|
-
uses: ./
|
|
96
|
-
with:
|
|
97
|
-
input-file: 'docs/README.md'
|
|
98
|
-
format: 'rdf'
|
|
99
|
-
output-name: 'test-rdf-jsonld'
|
|
100
|
-
rdf-format: 'json-ld'
|
|
101
|
-
rdf-type: 'Course'
|
|
102
|
-
rdf-educational-level: 'intermediate'
|
|
103
|
-
|
|
104
|
-
# Test RDF export (N-Quads)
|
|
105
|
-
- name: Export to RDF (N-Quads)
|
|
106
|
-
id: export-rdf-nquads
|
|
107
|
-
uses: ./
|
|
108
|
-
with:
|
|
109
|
-
input-file: 'docs/README.md'
|
|
110
|
-
format: 'rdf'
|
|
111
|
-
output-name: 'test-rdf-nquads'
|
|
112
|
-
rdf-format: 'n-quads'
|
|
113
|
-
rdf-type: 'EducationalResource'
|
|
114
|
-
|
|
115
|
-
# Test JSON export
|
|
116
|
-
- name: Export to JSON
|
|
117
|
-
id: export-json
|
|
118
|
-
uses: ./
|
|
119
|
-
with:
|
|
120
|
-
input-file: 'docs/README.md'
|
|
121
|
-
format: 'json'
|
|
122
|
-
output-name: 'test-json'
|
|
123
|
-
|
|
124
|
-
# Test with custom styling
|
|
125
|
-
- name: Export with Custom Styling
|
|
126
|
-
id: export-styled
|
|
127
|
-
uses: ./
|
|
128
|
-
with:
|
|
129
|
-
input-file: 'docs/README.md'
|
|
130
|
-
format: 'scorm1.2'
|
|
131
|
-
output-name: 'test-styled'
|
|
132
|
-
style: 'body { background-color: #f0f0f0; } .lia-slide { border: 2px solid #333; }'
|
|
133
|
-
scorm-organization: 'Styled Test'
|
|
134
|
-
|
|
135
|
-
# Test with course path override
|
|
136
|
-
- name: Export with Course Path Override
|
|
137
|
-
id: export-course-path
|
|
138
|
-
uses: ./
|
|
139
|
-
with:
|
|
140
|
-
input-file: 'docs/README.md'
|
|
141
|
-
course-path: 'docs'
|
|
142
|
-
format: 'scorm1.2'
|
|
143
|
-
output-name: 'test-course-path'
|
|
144
|
-
scorm-organization: 'Course Path Test'
|
|
145
|
-
|
|
146
|
-
# Upload all artifacts
|
|
147
|
-
- name: Upload SCORM 1.2 Full
|
|
148
|
-
uses: actions/upload-artifact@v4
|
|
149
|
-
with:
|
|
150
|
-
name: test-scorm12-full
|
|
151
|
-
path: ${{ steps.export-scorm12.outputs.output-file }}
|
|
152
|
-
|
|
153
|
-
- name: Upload SCORM 2004
|
|
154
|
-
uses: actions/upload-artifact@v4
|
|
155
|
-
with:
|
|
156
|
-
name: test-scorm2004
|
|
157
|
-
path: ${{ steps.export-scorm2004.outputs.output-file }}
|
|
158
|
-
|
|
159
|
-
- name: Upload PDF Custom
|
|
160
|
-
uses: actions/upload-artifact@v4
|
|
161
|
-
with:
|
|
162
|
-
name: test-pdf-custom
|
|
163
|
-
path: ${{ steps.export-pdf.outputs.output-file }}
|
|
164
|
-
|
|
165
|
-
- name: Upload Web Export
|
|
166
|
-
uses: actions/upload-artifact@v4
|
|
167
|
-
with:
|
|
168
|
-
name: test-web
|
|
169
|
-
path: ${{ steps.export-web.outputs.output-file }}
|
|
170
|
-
|
|
171
|
-
- name: Upload IMS Package
|
|
172
|
-
uses: actions/upload-artifact@v4
|
|
173
|
-
with:
|
|
174
|
-
name: test-ims
|
|
175
|
-
path: ${{ steps.export-ims.outputs.output-file }}
|
|
176
|
-
|
|
177
|
-
- name: Upload xAPI Package
|
|
178
|
-
uses: actions/upload-artifact@v4
|
|
179
|
-
with:
|
|
180
|
-
name: test-xapi
|
|
181
|
-
path: ${{ steps.export-xapi.outputs.output-file }}
|
|
182
|
-
|
|
183
|
-
- name: Upload RDF JSON-LD
|
|
184
|
-
uses: actions/upload-artifact@v4
|
|
185
|
-
with:
|
|
186
|
-
name: test-rdf-jsonld
|
|
187
|
-
path: ${{ steps.export-rdf-jsonld.outputs.output-file }}
|
|
188
|
-
|
|
189
|
-
- name: Upload RDF N-Quads
|
|
190
|
-
uses: actions/upload-artifact@v4
|
|
191
|
-
with:
|
|
192
|
-
name: test-rdf-nquads
|
|
193
|
-
path: ${{ steps.export-rdf-nquads.outputs.output-file }}
|
|
194
|
-
|
|
195
|
-
- name: Upload JSON Export
|
|
196
|
-
uses: actions/upload-artifact@v4
|
|
197
|
-
with:
|
|
198
|
-
name: test-json
|
|
199
|
-
path: ${{ steps.export-json.outputs.output-file }}
|
|
200
|
-
|
|
201
|
-
- name: Upload Styled Export
|
|
202
|
-
uses: actions/upload-artifact@v4
|
|
203
|
-
with:
|
|
204
|
-
name: test-styled
|
|
205
|
-
path: ${{ steps.export-styled.outputs.output-file }}
|
|
206
|
-
|
|
207
|
-
- name: Upload Course Path Test
|
|
208
|
-
uses: actions/upload-artifact@v4
|
|
209
|
-
with:
|
|
210
|
-
name: test-course-path
|
|
211
|
-
path: ${{ steps.export-course-path.outputs.output-file }}
|
|
212
|
-
|
|
213
|
-
# Summary step to display all results
|
|
214
|
-
- name: Export Summary
|
|
215
|
-
run: |
|
|
216
|
-
echo "## Export Results Summary" >> $GITHUB_STEP_SUMMARY
|
|
217
|
-
echo "| Format | Output File | File Size | Status |" >> $GITHUB_STEP_SUMMARY
|
|
218
|
-
echo "|--------|-------------|-----------|---------|" >> $GITHUB_STEP_SUMMARY
|
|
219
|
-
echo "| SCORM 1.2 Full | ${{ steps.export-scorm12.outputs.output-file }} | ${{ steps.export-scorm12.outputs.file-size }} bytes | ✅ |" >> $GITHUB_STEP_SUMMARY
|
|
220
|
-
echo "| SCORM 2004 | ${{ steps.export-scorm2004.outputs.output-file }} | ${{ steps.export-scorm2004.outputs.file-size }} bytes | ✅ |" >> $GITHUB_STEP_SUMMARY
|
|
221
|
-
echo "| PDF Custom | ${{ steps.export-pdf.outputs.output-file }} | ${{ steps.export-pdf.outputs.file-size }} bytes | ✅ |" >> $GITHUB_STEP_SUMMARY
|
|
222
|
-
echo "| Web Export | ${{ steps.export-web.outputs.output-file }} | ${{ steps.export-web.outputs.file-size }} bytes | ✅ |" >> $GITHUB_STEP_SUMMARY
|
|
223
|
-
echo "| IMS Package | ${{ steps.export-ims.outputs.output-file }} | ${{ steps.export-ims.outputs.file-size }} bytes | ✅ |" >> $GITHUB_STEP_SUMMARY
|
|
224
|
-
echo "| xAPI Package | ${{ steps.export-xapi.outputs.output-file }} | ${{ steps.export-xapi.outputs.file-size }} bytes | ✅ |" >> $GITHUB_STEP_SUMMARY
|
|
225
|
-
echo "| RDF JSON-LD | ${{ steps.export-rdf-jsonld.outputs.output-file }} | ${{ steps.export-rdf-jsonld.outputs.file-size }} bytes | ✅ |" >> $GITHUB_STEP_SUMMARY
|
|
226
|
-
echo "| RDF N-Quads | ${{ steps.export-rdf-nquads.outputs.output-file }} | ${{ steps.export-rdf-nquads.outputs.file-size }} bytes | ✅ |" >> $GITHUB_STEP_SUMMARY
|
|
227
|
-
echo "| JSON Export | ${{ steps.export-json.outputs.output-file }} | ${{ steps.export-json.outputs.file-size }} bytes | ✅ |" >> $GITHUB_STEP_SUMMARY
|
|
228
|
-
echo "| Styled Export | ${{ steps.export-styled.outputs.output-file }} | ${{ steps.export-styled.outputs.file-size }} bytes | ✅ |" >> $GITHUB_STEP_SUMMARY
|
|
229
|
-
echo "| Course Path Test | ${{ steps.export-course-path.outputs.output-file }} | ${{ steps.export-course-path.outputs.file-size }} bytes | ✅ |" >> $GITHUB_STEP_SUMMARY
|
|
230
|
-
echo "" >> $GITHUB_STEP_SUMMARY
|
|
231
|
-
echo "**Total Tests Completed: 11**" >> $GITHUB_STEP_SUMMARY
|
package/action/README.md
DELETED
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
# LiaScript Exporter GitHub Action
|
|
2
|
-
|
|
3
|
-
Export LiaScript courses to SCORM, PDF, Web, and other formats for LMS deployment and distribution directly from your GitHub repository.
|
|
4
|
-
|
|
5
|
-
## Quick Start
|
|
6
|
-
|
|
7
|
-
Add this action to your workflow:
|
|
8
|
-
|
|
9
|
-
```yaml
|
|
10
|
-
- name: Export course to SCORM
|
|
11
|
-
id: export
|
|
12
|
-
uses: LiaScript/LiaScript-Exporter@master
|
|
13
|
-
with:
|
|
14
|
-
input-file: 'README.md'
|
|
15
|
-
format: 'scorm1.2'
|
|
16
|
-
output-name: 'my-course'
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Inputs
|
|
20
|
-
|
|
21
|
-
### Core Inputs (Required)
|
|
22
|
-
|
|
23
|
-
| Input | Description | Example |
|
|
24
|
-
|-------|-------------|---------|
|
|
25
|
-
| `input-file` | Path to README.md or project.yml file | `course1/README.md` |
|
|
26
|
-
| `format` | Export format | `scorm1.2`, `pdf`, `web`, `ims`, `xapi`, `rdf`, `json` |
|
|
27
|
-
|
|
28
|
-
### Core Inputs (Optional)
|
|
29
|
-
|
|
30
|
-
| Input | Description | Default |
|
|
31
|
-
|-------|-------------|---------|
|
|
32
|
-
| `output-name` | Base name for output files | Derived from input file |
|
|
33
|
-
| `course-path` | Directory containing the course | Directory of input-file |
|
|
34
|
-
|
|
35
|
-
### SCORM Settings
|
|
36
|
-
|
|
37
|
-
| Input | Description | Default |
|
|
38
|
-
|-------|-------------|---------|
|
|
39
|
-
| `scorm-organization` | Organization title | - |
|
|
40
|
-
| `scorm-mastery-score` | Mastery score (0-100) | `0` |
|
|
41
|
-
| `scorm-typical-duration` | Duration (PT0H5M0S format) | `PT0H5M0S` |
|
|
42
|
-
| `scorm-iframe` | Use iframe for SCORM | `false` |
|
|
43
|
-
| `scorm-embed` | Embed Markdown in JS | `false` |
|
|
44
|
-
| `scorm-always-active` | Keep SCORM always active | `false` |
|
|
45
|
-
|
|
46
|
-
### PDF Settings
|
|
47
|
-
|
|
48
|
-
| Input | Description | Default |
|
|
49
|
-
|-------|-------------|---------|
|
|
50
|
-
| `pdf-theme` | LiaScript theme | `default` |
|
|
51
|
-
| `pdf-format` | Paper format | `A4` |
|
|
52
|
-
| `pdf-scale` | Webpage rendering scale | `1` |
|
|
53
|
-
| `pdf-landscape` | Landscape orientation | `false` |
|
|
54
|
-
| `pdf-print-background` | Print background graphics | `false` |
|
|
55
|
-
| `pdf-stylesheet` | Custom CSS file path | - |
|
|
56
|
-
|
|
57
|
-
### Web Settings
|
|
58
|
-
|
|
59
|
-
| Input | Description | Default |
|
|
60
|
-
|-------|-------------|---------|
|
|
61
|
-
| `web-zip` | Create zip archive | `true` |
|
|
62
|
-
| `web-indexeddb` | Enable IndexedDB storage | `false` |
|
|
63
|
-
| `web-iframe` | Use iframe version | `false` |
|
|
64
|
-
|
|
65
|
-
### IMS Settings
|
|
66
|
-
|
|
67
|
-
| Input | Description | Default |
|
|
68
|
-
|-------|-------------|---------|
|
|
69
|
-
| `ims-indexeddb` | Use IndexedDB for persistence | `false` |
|
|
70
|
-
|
|
71
|
-
### xAPI Settings
|
|
72
|
-
|
|
73
|
-
| Input | Description | Default |
|
|
74
|
-
|-------|-------------|---------|
|
|
75
|
-
| `xapi-endpoint` | LRS endpoint URL | - |
|
|
76
|
-
| `xapi-auth` | Authentication string | - |
|
|
77
|
-
| `xapi-actor` | xAPI actor JSON | - |
|
|
78
|
-
| `xapi-course-id` | Course identifier | - |
|
|
79
|
-
| `xapi-course-title` | Course title | - |
|
|
80
|
-
| `xapi-debug` | Enable debug logging | `false` |
|
|
81
|
-
| `xapi-zip` | Package as zip | `false` |
|
|
82
|
-
|
|
83
|
-
### RDF Settings
|
|
84
|
-
|
|
85
|
-
| Input | Description | Default |
|
|
86
|
-
|-------|-------------|---------|
|
|
87
|
-
| `rdf-format` | Output format (json-ld, n-quads) | `json-ld` |
|
|
88
|
-
| `rdf-url` | External URL reference | - |
|
|
89
|
-
| `rdf-type` | Schema.org type | `Course` |
|
|
90
|
-
| `rdf-license` | License URL | - |
|
|
91
|
-
| `rdf-educational-level` | Educational level | - |
|
|
92
|
-
|
|
93
|
-
### General Settings
|
|
94
|
-
|
|
95
|
-
| Input | Description | Default |
|
|
96
|
-
|-------|-------------|---------|
|
|
97
|
-
| `style` | Additional CSS styling | - |
|
|
98
|
-
| `responsive-voice-key` | Text-to-speech API key | - |
|
|
99
|
-
|
|
100
|
-
## Outputs
|
|
101
|
-
|
|
102
|
-
| Output | Description |
|
|
103
|
-
|--------|-------------|
|
|
104
|
-
| `output-file` | Path to the generated file |
|
|
105
|
-
| `file-size` | Size of generated file in bytes |
|
|
106
|
-
| `format` | Format that was generated |
|
|
107
|
-
| `success` | Whether export succeeded (true/false) |
|
|
108
|
-
|
|
109
|
-
## Usage Examples
|
|
110
|
-
|
|
111
|
-
### Single Course Export
|
|
112
|
-
|
|
113
|
-
```yaml
|
|
114
|
-
name: Export Course
|
|
115
|
-
on: [push]
|
|
116
|
-
|
|
117
|
-
jobs:
|
|
118
|
-
export:
|
|
119
|
-
runs-on: ubuntu-latest
|
|
120
|
-
steps:
|
|
121
|
-
- uses: actions/checkout@v4
|
|
122
|
-
|
|
123
|
-
- name: Export to SCORM
|
|
124
|
-
id: export
|
|
125
|
-
uses: LiaScript/LiaScript-Exporter@master
|
|
126
|
-
with:
|
|
127
|
-
input-file: 'README.md'
|
|
128
|
-
format: 'scorm1.2'
|
|
129
|
-
output-name: 'my-course'
|
|
130
|
-
scorm-organization: 'My Organization'
|
|
131
|
-
scorm-mastery-score: '80'
|
|
132
|
-
|
|
133
|
-
- name: Upload SCORM package
|
|
134
|
-
uses: actions/upload-artifact@v4
|
|
135
|
-
with:
|
|
136
|
-
name: scorm-package
|
|
137
|
-
path: ${{ steps.export.outputs.output-file }}
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### Multi-Course Matrix Build
|
|
141
|
-
|
|
142
|
-
```yaml
|
|
143
|
-
name: Export All Courses
|
|
144
|
-
on: [push]
|
|
145
|
-
|
|
146
|
-
jobs:
|
|
147
|
-
export:
|
|
148
|
-
runs-on: ubuntu-latest
|
|
149
|
-
strategy:
|
|
150
|
-
matrix:
|
|
151
|
-
course: ['course1', 'course2', 'course3']
|
|
152
|
-
format: ['scorm1.2', 'pdf', 'web']
|
|
153
|
-
|
|
154
|
-
steps:
|
|
155
|
-
- uses: actions/checkout@v4
|
|
156
|
-
|
|
157
|
-
- name: Export ${{ matrix.course }} to ${{ matrix.format }}
|
|
158
|
-
id: export
|
|
159
|
-
uses: LiaScript/LiaScript-Exporter@master
|
|
160
|
-
with:
|
|
161
|
-
input-file: '${{ matrix.course }}/README.md'
|
|
162
|
-
format: '${{ matrix.format }}'
|
|
163
|
-
output-name: '${{ matrix.course }}-${{ matrix.format }}'
|
|
164
|
-
|
|
165
|
-
- name: Upload artifacts
|
|
166
|
-
uses: actions/upload-artifact@v4
|
|
167
|
-
with:
|
|
168
|
-
name: ${{ matrix.course }}-${{ matrix.format }}
|
|
169
|
-
path: ${{ steps.export.outputs.output-file }}
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
### Release Automation
|
|
173
|
-
|
|
174
|
-
```yaml
|
|
175
|
-
name: Release
|
|
176
|
-
on:
|
|
177
|
-
push:
|
|
178
|
-
tags: ['v*']
|
|
179
|
-
|
|
180
|
-
jobs:
|
|
181
|
-
release:
|
|
182
|
-
runs-on: ubuntu-latest
|
|
183
|
-
steps:
|
|
184
|
-
- uses: actions/checkout@v4
|
|
185
|
-
|
|
186
|
-
- name: Export to SCORM
|
|
187
|
-
id: export-scorm
|
|
188
|
-
uses: LiaScript/LiaScript-Exporter@master
|
|
189
|
-
with:
|
|
190
|
-
input-file: 'README.md'
|
|
191
|
-
format: 'scorm1.2'
|
|
192
|
-
output-name: 'course-${{ github.ref_name }}'
|
|
193
|
-
|
|
194
|
-
- name: Export to PDF
|
|
195
|
-
id: export-pdf
|
|
196
|
-
uses: LiaScript/LiaScript-Exporter@master
|
|
197
|
-
with:
|
|
198
|
-
input-file: 'README.md'
|
|
199
|
-
format: 'pdf'
|
|
200
|
-
output-name: 'course-${{ github.ref_name }}'
|
|
201
|
-
|
|
202
|
-
- name: Create Release
|
|
203
|
-
uses: softprops/action-gh-release@v1
|
|
204
|
-
with:
|
|
205
|
-
files: |
|
|
206
|
-
${{ steps.export-scorm.outputs.output-file }}
|
|
207
|
-
${{ steps.export-pdf.outputs.output-file }}
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
## Development
|
|
211
|
-
|
|
212
|
-
### Setup
|
|
213
|
-
|
|
214
|
-
```bash
|
|
215
|
-
cd action
|
|
216
|
-
npm install
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
### Build
|
|
220
|
-
|
|
221
|
-
```bash
|
|
222
|
-
npm run build
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
### Test
|
|
226
|
-
|
|
227
|
-
```bash
|
|
228
|
-
npm run test
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
## Troubleshooting
|
|
232
|
-
|
|
233
|
-
### Common Issues
|
|
234
|
-
|
|
235
|
-
**PDF export hangs or fails**
|
|
236
|
-
- PDF exports use Puppeteer (headless Chrome) which requires sufficient memory and may take several minutes for complex courses
|
|
237
|
-
- Ensure the course content renders properly in a regular browser first
|
|
238
|
-
|
|
239
|
-
**Output file not found**
|
|
240
|
-
- Check that the `output-name` parameter matches the expected file pattern
|
|
241
|
-
- Verify the input file path is correct relative to the repository root
|
|
242
|
-
- Review the action logs for detailed file search information
|
|
243
|
-
|
|
244
|
-
### Debug Information
|
|
245
|
-
|
|
246
|
-
The action provides detailed logging including:
|
|
247
|
-
- Input validation and parsing
|
|
248
|
-
- File path resolution
|
|
249
|
-
- CLI command construction
|
|
250
|
-
- Real-time export progress
|
|
251
|
-
- Output file detection
|
|
252
|
-
|
|
253
|
-
Enable debug logging in your workflow:
|
|
254
|
-
|
|
255
|
-
```yaml
|
|
256
|
-
- name: Export with debug
|
|
257
|
-
uses: LiaScript/LiaScript-Exporter@master
|
|
258
|
-
with:
|
|
259
|
-
input-file: 'README.md'
|
|
260
|
-
format: 'scorm1.2'
|
|
261
|
-
env:
|
|
262
|
-
ACTIONS_STEP_DEBUG: true
|
|
263
|
-
```
|