npm explorer

@liascript/exporter

v2.6.46--0.17.10

A generic exporter for LiaScript

LiaScriptSCORMOERMarkdownOER
0/weekUpdated 2 months agoISCUnpacked: 155.7 MB
Published by André Dietrich
npm install @liascript/exporter
RepositoryHomepagenpm

> ## 🚧 Under Construction / Im Umbau 🚧
>
> We are excited to announce that the LiaScript-Exporter has received funding through the OE_Sprints program!
>
> ![](https://media2.giphy.com/media/v1.Y2lkPTc5MGI3NjExaWdxeGVzcXlyaHMyZmJzODA2OXRvazB1bjk3ZWZtMXpoMXRmd2p2aSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/hV1dkT2u1gqTUpKdKy/giphy.gif)
>
> This project (LiaEx - OER Exporter für LiaScript) is funded by the German Federal Ministry for Family Affairs, Senior Citizens, Women and Youth (BMBFSFJ) as part of the federal government's OER strategy from October 15, 2025 to April 14, 2026 (funding code: 01PZ25002).
>
> ### What's happening?
>
> We are currently restructuring and extending the LiaScript-Exporter to:
>
> - Improve export capabilities for various Learning Management Systems (LMS)
> - Develop a bridge function for conversion to H5P systems
> - Create modern desktop and web applications
> - Enhance OER-friendly infrastructure based on open standards and open source software
>
> The goal is to reduce barriers, increase the likelihood of cross-educational use, and enable the OER and LiaScript communities to maintain and develop the software further.

LiaScript-Exporter

This shall be a generic LiaScript-Exporter that can export educational content
into different formats, so that LiaScript courses can also be utilized in
different Learning Management Systems (LMS) or Readers for static content (PDF,
ePub, ...). At the moment there is only support for SCORM1.2, as the most
wide-spread exchange format. See the last section
LMS Support List

> __But__, it is still the easiest way to share your courses via
> __https://LiaScript.github.io/course/?YOUR_REPO__. The LiaScript course
> website is a fully fledged "offline-first" Progressive Web App (PWA), which
> allows to store all of your courses and states directly within your browser. If
> you are comming from Android, you can also directly install the website as an
> app on your device. Actually, there is now need for a BackEnd-system anymore,
> but if you need to track the progress of you students, you can use this tool...

Install

At the moment this is a simple command-line tool based on NodeJS, thus you will
have to install NodeJS first, which contains also npm the Node Package
Manager. You can directly download the installer for your system from:

Afterwards you can open your terminal and type in the following command, this
will install the LiaScript-Exporter as a global application on your system.

__Install from npm:__

`` bash
npm install -g --verbose @liascript/exporter
`

Depending on your configuration, you might need to run this command with root
privileges. In my case on Linux it is simply:

` bash
sudo npm install -g --verbose @liascript/exporter
`

Depending on your configuration, you might need to run this command with root
privileges. In my case on Linux it is simply:

` bash
sudo npm install -g --verbose https://github.com/liaScript/LiaScript-Exporter
`

On Windows you might need to run the terminal with administrator-privileges.

Basic CLI usage

If you have installed the package, you can now use liaex or
liascript-exporter. If you type one of the following commands, you will get
the following output.

` shell
$ liaex
No input defined
LiaScript-Exporter

Export your LiaScript Markdown files to different formats. The following
commandline options are available. Based on the selected output format,
additional options can be used.

-h --help show this help
-i --input file to be used as input
-p --path path to be packed, if not set, the path of the input
file is used
-o --output output file name (default is output), the ending is
define by the format
-s --style additional styling to passed to the export, can be
used for fixes, such as "height: 100vh; width: 100%;
border: 2px;"
-f --format scorm1.2, scorm2004, json, fullJson, web, ims, pdf,
android, linkedData (default is json)
-v --version output the current version
-k --key responsive voice key

SCORM settings:

SCORM (Sharable Content Object Reference Model) 1.2 & 2004 are standards for
e-learning content that can be imported into LMS platforms like Moodle,
Blackboard, and others.

Learn more: https://scorm.com/scorm-explained/

Known SCORM configurations per LMS:
https://www.npmjs.com/package/@liascript/exporter#scorm-examples

--scorm-organization set the organization title
--scorm-masteryScore set the scorm masteryScore (a value between 0
-- 100), default is 0
--scorm-typicalDuration set the scorm duration, default is PT0H5M0S
--scorm-iframe use an iframe, when a SCORM starting
parameter is not working
--scorm-embed embed the Markdown into the JS code,
use in Moodle 4 to handle restrictions with dynamic
loading

IMS settings:

IMS (Instructional Management Systems) Content Package is an interoperable
standard format for packaging learning content between different LMSes.

Learn more: https://www.imsglobal.org/content/packaging/index.html

--ims-indexeddb Use IndexedDB to store data persistently

WEB settings:

Pack the project into a self contained web project that can be hosted
everywhere.

--web-iframe Use an iframed version to hide the
course URL.
--web-indexeddb This will allow to store data within the
browser using indexeddb, you can optionally pass a
unique key (by default one is generated randomly).
--web-zip By default the result is not
zipped, you can change this with this parameter.

Android settings:

Android export generates a native Android application (.apk) from your LiaScript
course using Capacitor. This requires the Android SDK to be installed on your
system.

Learn more:
- Capacitor: https://capacitorjs.com/
- Android SDK: https://developer.android.com/studio

--android-sdk Specify sdk.dir which is required for
building.
--android-appName Name of the App (Main-title is used as
default).
--android-appId Required to identify your App reverse url
such as io.github.liascript
--android-icon Optional icon with 1024x1024 px
--android-splash Optional splash image with 2732x2732 px
--android-splashDuration Duration for splash-screen default 0 milliseconds
--android-preview Open course in Android-Studio

PDF settings:

PDF export generates printable documents from your LiaScript course using
Puppeteer, a headless Chrome browser automation tool. This allows for
high-quality rendering of all course elements including interactive content.

Learn more: https://pptr.dev/

--pdf-stylesheet Inject an local CSS for changing the
appearance.
--pdf-theme LiaScript themes: default, turquoise,
blue, red, yellow
--pdf-timeout Set an additional time horizon to wait
until finished.
--pdf-preview Open preview-browser (default false),
print not possible

The following are puppeteer specific settings.

Learn more:
https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#pagepdfoptions

--pdf-scale Scale of the webpage rendering.
Defaults to 1. Scale amount must be between 0.1 and
2.
--pdf-displayHeaderFooter Display header and footer. Defaults to false.
--pdf-headerTemplate HTML template for the print header, inject
classes date, title, url, pageNumber, totalPages
--pdf-footerTemplate HTML template for the print footer. Should use
the same format as the headerTemplate
--pdf-printBackground Print background graphics. Defaults to false
--pdf-landscape Paper orientation. Defaults to false.
--pdf-pageRanges Paper ranges to print, e.g., "1-5, 8,
11-13"
--pdf-format Paper format. If set, takes priority
over width or height options. Defaults to a4.
--pdf-width Paper width, accepts values labeled
with units.
--pdf-height Paper height, accepts values labeled
with units.
--pdf-margin-top Top margin, accepts values labeled with
units.
--pdf-margin-right Right margin, accepts values labeled with
units.
--pdf-margin-bottom Bottom margin, accepts values labeled with
units.
--pdf-margin-left Left margin, accepts values labeled with
units.
--pdf-preferCSSPageSize Give any CSS @page size declared in the page
priority over what is declared in width and height
or format options.
--pdf-omitBackground Hides default white background and allows
capturing screenshots with transparency. Defaults to
true.

Project settings:

A project is a bundle for multiple LiaScript resource into a single project
overview page, based on a provided yaml description.

Learn more: https://www.npmjs.com/package/@liascript/exporter#project

Example:
- Input: https://github.com/LiaBooks/liabooks.github.com/blob/main/project.yml
- Output: https://liabooks.github.io

--project-no-meta Disable the generation of meta information
for OpenGraph and Twitter-cards.
--project-no-rdf Disable the generation of json-ld.
--project-no-categories Disable the filter for categories/tags.
--project-category-blur Enable this and the categories will be blurred
instead of deleted.
--project-generate-scrom12 SCORM12 and pass additional scrom settings.
--project-generate-scrom2004SCORM2004 and pass additional scrom settings.
--project-generate-ims IMS resources with additional config settings.
--project-generate-pdf PDFs are automatically generated and added to
every card.
--project-generate-cache Only generate new files, if they do not exist.

RDF settings:

RDF (Resource Description Framework) export generates structured metadata for
your LiaScript course or your project-yaml in standard linked data formats. This
helps with course discovery and enables semantic web applications to understand
your content. Available output formats are n-quads and JSON-LD.

Learn more:
- RDF: https://www.w3.org/RDF/
- N-Quads: https://www.w3.org/TR/n-quads/
- JSON-LD: https://json-ld.org/

--rdf-format Output format n-quads, json-ld
(defaults to json-ld).
--rdf-preview Output the result to the console.
--rdf-url Refer to an external URL when
parsing a local project.
--rdf-type Course frm schmema.org is applied as
default, overwrite this with EducationalResource,
etc.
--rdf-license Add a license-URL, otherwise if url was
provided as input, this will check for an existing
LICENSE file.
--rdf-educationalLevel Typically beginner, intermediate or advanced,
and formal sets of level indicators.
--rdf-template Use a URL or json-file as a template.
`

$3

If you want to generate a SCORM1.2 conformant package of you LiaScript-course,
use the following command:

` shell
$ liaex -i project/README.md --format scorm1.2 --output rockOn

..
project/README.md
project/Lizenz.md
..
[17:8:33] SCORM 'Init'
[17:8:33] SCORM 'create /tmp/lia202037-30349-o6yx80.zb0eo/pro/imsmanifest.xml'
[17:8:33] SCORM 'create /tmp/lia202037-30349-o6yx80.zb0eo/pro/metadata.xml'
[17:8:33] SCORM 'create /tmp/lia202037-30349-o6yx80.zb0eo/pro/adlcp_rootv1p2.xsd'
[17:8:33] SCORM 'create /tmp/lia202037-30349-o6yx80.zb0eo/pro/ims_xml.xsd'
[17:8:33] SCORM 'create /tmp/lia202037-30349-o6yx80.zb0eo/pro/imscp_rootv1p1p2.xsd'
[17:8:33] SCORM 'create /tmp/lia202037-30349-o6yx80.zb0eo/pro/imsmd_rootv1p2p1.xsd'
[17:8:33] SCORM 'Archiving /tmp/lia202037-30349-o6yx80.zb0eo/pro to rockOn.zip'
[17:8:34] SCORM 'rockOn.zip 4977779 total bytes'
Done

$ ls
.. rockOn.zip ..
`

The format is scorm1.2 and the input folder is project/README.md. All the
content and sub-folders of this folder is then copied into your SCORM.zip. The
name is defined by your output definition and contains the current version
number of you course as well as the current date.

> Note: SCORM 1.2 is too restrictive for storing data, that is why we currently
> only support to store location information, all states of quizzes, surveys, etc.
> will be lost after reload.
>
> Better use __SCORM2004__ as output

__Text 2 Speech --key__

If you want to use text2speech, you will have to register your website (where
the scorm package will be served) at ... it is free
for educational and non commercial purposes. After your registration, you will
get a key in the format of
KluQksUs. To inject this key into your package,
simply add the key as a parameter:

` shell
$ liaex -i project/README.md --format scorm1.2 --key KluQksUs --output rockOn
...
`

__Mastery Score --scorm-masteryScore__

You can define the percentage of quizzes and surveys a student had to fullfil
in order to accomplish or pass the course by adding the
--scorm-masteryScore
parameter. Just set it to 0 to allow all to pass the course, otherwise choose a
value between 0 and 100. All quizzes and surveys are treated equally, thus if
your course contains 10 quizzes, every quiz counts as 10%. If you do not set
this parameter, a default value of 80 percent is used.

` shell
$ liaex -i project/README.md --format scorm1.2 --scorm-masteryScore 0 --output rockOn
...
`

__Other Root --path__

If your README is not in the root of your project, you can also use the --path
parameter to the directory to be copied into your scorm project. You will still
have to use
--input to define the main course document, but his has to be
relative to path parameter.

__--scrom-organization__

This parameter simply sets the organization parameter in your SCORM
imsmanifest file. All other parameters are taken from the course

__--scorm-iframe__

Some LMS like ILIAS or OpenOlat seem to have problems with the required
startingParameter and will not load SCORM1.2 courses properly. To fix this,
this parameter can be used. It tries to run the course within an additional