Skip to content

Commit 8d3b5f4

Browse files
committed
update cli git export
1 parent 4ee587f commit 8d3b5f4

5 files changed

Lines changed: 241 additions & 21 deletions

File tree

README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ The web interface allows you to:
7171

7272
All exports are processed asynchronously in a queue, with only one export running at a time. After submitting an export, you'll receive a job ID and can track the progress on a status page.
7373

74+
> **Note:** the **Git repository** source (in both the desktop app and the web
75+
> UI) requires [`git`](https://git-scm.com/downloads) to be installed and
76+
> available on your `PATH`. Uploading files does not need git.
77+
7478
### 3. CLI
7579

7680
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`).
@@ -87,11 +91,65 @@ Once installed, use `liaex` or `liascript-exporter`. Core options:
8791
-s --style additional CSS to inject
8892
-v --version print version
8993
-k --key ResponsiveVoice key for text-to-speech
94+
95+
--git-url clone a git/GitHub repository and export from it (used instead of -i)
96+
--git-branch branch or tag to checkout (default: repository default)
97+
--git-subdir subdirectory within the repository to use as the root
98+
--git-file specific markdown file to export (default: README.md or first .md found)
9099
```
91100
92101
Format-specific options are documented in the sections below. You can also run
93102
`liaex --help` at any time to see the full list.
94103
104+
### Export from a Git repository
105+
106+
Instead of pointing `-i` at a local file, you can let the exporter clone a
107+
repository and export directly from it with `--git-url`. The repo is cloned to a
108+
temporary directory and removed automatically when the export finishes.
109+
110+
> **Note:** this requires [`git`](https://git-scm.com/downloads) to be installed
111+
> and available on your `PATH`.
112+
113+
``` bash
114+
# Export the README.md of a repository to SCORM 2004
115+
liaex --git-url https://github.com/LiaScript/LiaScript -f scorm2004 -o course
116+
117+
# Export a specific file from a branch/subdirectory
118+
liaex --git-url https://github.com/user/repo \
119+
--git-branch main \
120+
--git-subdir docs \
121+
--git-file 01_Intro.md \
122+
-f web -o course
123+
```
124+
125+
### Presets
126+
127+
Presets bundle a format together with the recommended options for a specific
128+
learning platform, so you don't have to remember the right `--scorm-*` flags for
129+
each LMS. Use them with `-f presets` followed by the preset flag:
130+
131+
``` bash
132+
liaex -f presets --scormcloud-2004 -i course/README.md -o course
133+
```
134+
135+
| Preset flag | Platform | Format |
136+
| ------------------- | ------------ | --------- |
137+
| `--moodle3` | Moodle 3.x | scorm1.2 |
138+
| `--moodle4` | Moodle 4.x | scorm1.2 |
139+
| `--moodle5` | Moodle 5.x | scorm1.2 |
140+
| `--ilias` | ILIAS | scorm1.2 |
141+
| `--opal` | OPAL | scorm1.2 |
142+
| `--scormcloud-1.2` | SCORM Cloud | scorm1.2 |
143+
| `--scormcloud-2004` | SCORM Cloud | scorm2004 |
144+
| `--openolat` | OpenOlat | scorm1.2 |
145+
| `--openedx` | Open edX | scorm2004 |
146+
| `--learnworlds` | LearnWorlds | scorm2004 |
147+
148+
Run `liaex -f presets` to list the available presets, or
149+
`liaex -f presets --<preset>` (without an input) to print a preset's full
150+
configuration. Any extra options you pass on the command line override the
151+
preset's defaults.
152+
95153
<video src="https://github.com/user-attachments/assets/591a6c89-f91e-401f-8b6d-8523f7173d78" controls width="600"></video>
96154

97155
### Docker (Android export)

0 commit comments

Comments
 (0)