You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -69,7 +69,24 @@ All exports are processed asynchronously in a queue, with only one export runnin
69
69
70
70
### 3. CLI
71
71
72
-
For scripting, automation, or CI/CD pipelines, the exporter can be used directly from the command line. Install the same way as above (Node.js + `npm install -g @liascript/exporter`), then see [Basic CLI usage](#Basic-CLI-usage) below.
72
+
For scripting, automation, or CI/CD pipelines, the exporter can be used directly from the command line. Install the same way as above (Node.js + `npm install -g @liascript/exporter`).
73
+
74
+
Once installed, use `liaex` or `liascript-exporter`. Core options:
75
+
76
+
```shell
77
+
-h --help show help
78
+
-i --input input file (Markdown or YAML for projects)
79
+
-p --path path to pack (defaults to the input file's directory)
80
+
-o --output output file name (default: "output"; extension set by format)
[17:8:33] SCORM 'Archiving /tmp/lia202037-30349-o6yx80.zb0eo/pro to rockOn.zip'
139
134
[17:8:34] SCORM 'rockOn.zip 4977779 total bytes'
140
135
Done
@@ -188,10 +183,14 @@ parameter to the directory to be copied into your scorm project. You will still
188
183
have to use `--input` to define the main course document, but his has to be
189
184
relative to path parameter.
190
185
191
-
__`--scrom-organization`__
186
+
__`--scorm-organization`__
192
187
193
188
This parameter simply sets the organization parameter in your SCORM
194
-
`imsmanifest` file. All other parameters are taken from the course
189
+
`imsmanifest` file. All other parameters are taken from the course.
190
+
191
+
__`--scorm-typicalDuration`__
192
+
193
+
Set the expected duration of the course in ISO 8601 duration format (e.g. `PT1H30M0S` for 1.5 hours). Default is `PT0H5M0S`.
195
194
196
195
__`--scorm-iframe`__
197
196
@@ -200,6 +199,10 @@ Some LMS like ILIAS or OpenOlat seem to have problems with the required
200
199
this parameter can be used. It tries to run the course within an additional
201
200
`<iframe>`.
202
201
202
+
__`--scorm-embed`__
203
+
204
+
Embed the Markdown source directly into the JavaScript code. Use this for Moodle 4 and other LMS that impose restrictions on dynamic loading of external resources.
205
+
203
206
### SCORM2004
204
207
205
208
This output format provides the same settings as `scorm1.2`, but it allows to
[12:38:31] SCORM 'Archiving /tmp/lia2022114-556265-d2jh0k.odg7e/pro to rockOn.zip'
243
228
[12:38:32] SCORM 'rockOn.zip 19588706 total bytes'
244
229
Done
@@ -338,7 +323,7 @@ __`--web-iframe`:__ This will put the course into an secondary iframe, which wil
338
323
hide the course-URL (the Markdown-file). Unfortunately, it will not be possible
339
324
anymore to link from outside to a specific slide.
340
325
341
-
__`web-indexeddb`:__ Generate a LiaScript package that will store states persistently.
326
+
__`--web-indexeddb`:__ Generate a LiaScript package that will store states persistently.
342
327
By default, the database is generated uniquely for the packed course. That means,
343
328
every update will use a new database, which makes sense, if and only if, typos get
344
329
corrected or content is added to the end of the document. Mixing content and moving
@@ -352,6 +337,20 @@ updating description ...
352
337
updating logo ...
353
338
```
354
339
340
+
> **Note:** Web exports must be served over HTTP — opening `index.html` directly
341
+
> in a browser (`file://`) will not work due to browser security restrictions.
342
+
> To preview locally, use any static file server, for example:
343
+
>
344
+
> ```shell
345
+
> # using Node.js serve
346
+
> npx serve outputFolder
347
+
>
348
+
> # using Python
349
+
> python3 -m http.server --directory outputFolder
350
+
> ```
351
+
>
352
+
> Then open `http://localhost:3000` (or the port shown) in your browser.
353
+
355
354
### Android
356
355
357
356
> **Tip:** Setting up the Android SDK locally can be complex. The easiest approach
@@ -360,7 +359,7 @@ updating logo ...
360
359
To generate an APK project of your course locally, download the
361
360
[Android SDK](https://developer.android.com/studio) and provide the path
362
361
via the option `--android-sdk`. Additionally you will have to define an `appId`
363
-
via `--android-appId`, which is in most cases an unique URL (in reverse order)
362
+
via `--android-appId`, which is in most cases a unique URL (in reverse order)
364
363
that is pointing to your website/project. This export uses
365
364
[capacitorjs](https://capacitorjs.com) to pack the entire LiaScript runtime
366
365
environment and your resources into one installable Android apk.
@@ -441,6 +440,22 @@ $ ls
441
440
> If you want to preview the result, simply use `--android-preview`, which will
442
441
> open android-studio
443
442
443
+
__`--android-appName`__
444
+
445
+
Name of the app. The main title of the course is used as default.
446
+
447
+
__`--android-icon`__
448
+
449
+
Optional app icon image (1024x1024 px).
450
+
451
+
__`--android-splash`__
452
+
453
+
Optional splash screen image (2732x2732 px).
454
+
455
+
__`--android-splashDuration`__
456
+
457
+
Duration for the splash screen in milliseconds. Default is 0.
458
+
444
459
__Still a bit experimental__
445
460
446
461
### PDF
@@ -523,6 +538,40 @@ $ liaex --format pdf \
523
538
depending on the size of the course, this can take a while, please be patient...
524
539
```
525
540
541
+
The following are puppeteer-specific settings (see [puppeteer PDF options](https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#pagepdfoptions)):
542
+
543
+
__`--pdf-scale`__ Scale of the webpage rendering. Defaults to 1. Must be between 0.1 and 2.
544
+
545
+
__`--pdf-displayHeaderFooter`__ Display header and footer. Defaults to false.
546
+
547
+
__`--pdf-headerTemplate`__ HTML template for the print header. You can use the classes `date`, `title`, `url`, `pageNumber`, `totalPages`.
548
+
549
+
__`--pdf-footerTemplate`__ HTML template for the print footer. Same format as `--pdf-headerTemplate`.
550
+
551
+
__`--pdf-printBackground`__ Print background graphics. Defaults to false.
552
+
553
+
__`--pdf-landscape`__ Paper orientation. Defaults to false.
554
+
555
+
__`--pdf-pageRanges`__ Paper ranges to print, e.g. `"1-5, 8, 11-13"`.
556
+
557
+
__`--pdf-format`__ Paper format (e.g. `A4`, `Letter`). Takes priority over width/height. Defaults to A4.
558
+
559
+
__`--pdf-width`__ Paper width, accepts values with units (e.g. `210mm`).
560
+
561
+
__`--pdf-height`__ Paper height, accepts values with units.
562
+
563
+
__`--pdf-margin-top`__ Top margin, accepts values with units.
564
+
565
+
__`--pdf-margin-right`__ Right margin, accepts values with units.
566
+
567
+
__`--pdf-margin-bottom`__ Bottom margin, accepts values with units.
568
+
569
+
__`--pdf-margin-left`__ Left margin, accepts values with units.
570
+
571
+
__`--pdf-preferCSSPageSize`__ Give any CSS `@page` size declared in the page priority over `--pdf-format` / width / height options.
572
+
573
+
__`--pdf-omitBackground`__ Hide the default white background, allowing screenshots with transparency. Defaults to true.
574
+
526
575
### ePub
527
576
528
577
ePub export generates e-books from your LiaScript course using Puppeteer to render content and the `@lesjoursfr/html-to-epub` library to produce the ePub file. The output is compatible with most e-readers.
@@ -787,10 +836,30 @@ Such as, for which projects you want to generate a pdf and pass also all additio
787
836
Simply pass all arguments as `arguments` with the long name and without the starting dashes.
788
837
This way you can generate a very detailed project configuration and overview.
789
838
839
+
**Project settings:**
840
+
841
+
`--project-no-meta` Disable the generation of meta information for OpenGraph and Twitter-cards.
842
+
843
+
`--project-no-rdf` Disable the generation of JSON-LD.
844
+
845
+
`--project-no-categories` Disable the filter for categories/tags.
846
+
847
+
`--project-category-blur` Instead of hiding courses that do not match a selected category, blur them.
848
+
849
+
`--project-generate-scorm12` Generate a SCORM 1.2 package for every course. Pass additional SCORM settings alongside this flag.
850
+
851
+
`--project-generate-scorm2004` Generate a SCORM 2004 package for every course. Pass additional SCORM settings alongside this flag.
852
+
853
+
`--project-generate-ims` Generate IMS resources for every course. Pass additional IMS settings alongside this flag.
854
+
855
+
`--project-generate-pdf` PDFs are automatically generated and added to every card. Pass additional PDF settings alongside this flag.
856
+
857
+
`--project-generate-cache` Only generate new files if they do not already exist.
858
+
790
859
791
860
### RDF & JSON-LD
792
861
793
-
The LiaScript metainformation can be exported to RDF, either as json-ld or as n-quads. The option `--pdf-preview` generates a console output that can be used to inspect the result. Otherwise the result is stored in a file, defined by `-o`, the file-ending is either `.jsonld` or `.nq`, depending on the `--rdf-format`
862
+
The LiaScript metainformation can be exported to RDF, either as json-ld or as n-quads. The option `--rdf-preview` generates a console output that can be used to inspect the result. Otherwise the result is stored in a file, defined by `-o`, the file-ending is either `.jsonld` or `.nq`, depending on the `--rdf-format`
* `--rdf-type`: By default this type of resource is associated with `Course`, but you can use this param if you want to define `EducationalResource` or something else...
892
961
* `--rdf-educationalLevel`: This is currently not defined, but can be injected, typically these are beginner, intermediate, advanced, ...
893
962
* `--rdf-license`: Use this to specify the URL of the associated license to your course. This tool will automatically check if there is a LICENSE file in your project root and add this.
963
+
* `--rdf-template`: Use a URL or local JSON file as a base template for the RDF output.
0 commit comments