Skip to content

Commit cfef8e1

Browse files
improve: helper with more descriptions
1 parent 76eea9c commit cfef8e1

8 files changed

Lines changed: 110 additions & 22 deletions

File tree

dist/index.js

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/export/android.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ const { exec } = require('child_process')
88
export function help() {
99
console.log('\n', COLOR.heading('Android settings:'), '\n')
1010

11+
console.log(
12+
COLOR.italic(
13+
'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.\n'
14+
)
15+
)
16+
console.log('Learn more:')
17+
console.log('- Capacitor: https://capacitorjs.com/')
18+
console.log('- Android SDK: https://developer.android.com/studio')
19+
console.log('')
20+
1121
COLOR.command(
1222
null,
1323
'--android-sdk',

src/export/ims.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,32 @@ const path = require('path')
66
const fs = require('fs-extra')
77

88
export function help() {
9-
console.log('\n', COLOR.heading('IMS settings:'), '\n')
9+
console.log('')
10+
console.log(COLOR.heading('IMS settings:'), '\n')
11+
12+
console.log(
13+
COLOR.italic(
14+
'IMS (Instructional Management Systems) Content Package is an interoperable standard format for packaging learning content between different LMSes.'
15+
),
16+
'\n\nLearn more: https://www.imsglobal.org/content/packaging/index.html'
17+
)
18+
console.log('')
1019

1120
COLOR.command(
1221
null,
1322
'--ims-indexeddb',
1423
' Use IndexedDB to store data persistently'
1524
)
1625

17-
console.log('\n', COLOR.heading('WEB settings:'), '\n')
1826
console.log('')
27+
console.log(COLOR.heading('WEB settings:'), '\n')
28+
29+
console.log(
30+
COLOR.italic(
31+
'Pack the project into a self contained web project that can be hosted everywhere.\n'
32+
)
33+
)
34+
1935
COLOR.command(
2036
null,
2137
'--web-iframe',

src/export/pdf.ts

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,16 @@ const path = require('path')
55
import puppeteer from 'puppeteer'
66

77
export function help() {
8-
console.log('\n', COLOR.heading('PDF settings:'), '\n')
8+
console.log('')
9+
console.log(COLOR.heading('PDF settings:'), '\n')
10+
11+
console.log(
12+
COLOR.italic(
13+
'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.'
14+
)
15+
)
16+
console.log('\nLearn more: https://pptr.dev/')
17+
console.log('')
918

1019
COLOR.command(
1120
null,
@@ -22,14 +31,19 @@ export function help() {
2231
'--pdf-timeout',
2332
' Set an additional time horizon to wait until finished.'
2433
)
25-
console.log(
26-
'\nhttps://github.com/puppeteer/puppeteer/blob/main/docs/api.md#pagepdfoptions\n'
27-
)
2834
COLOR.command(
2935
null,
3036
'--pdf-preview',
3137
' Open preview-browser (default false), print not possible'
3238
)
39+
40+
console.log('')
41+
console.log(COLOR.italic('The following are puppeteer specific settings.'))
42+
43+
console.log(
44+
'\nLearn more: https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#pagepdfoptions\n'
45+
)
46+
3347
COLOR.command(
3448
null,
3549
'--pdf-scale',

src/export/project.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,24 @@ export function storeNext(collection: any, data: any) {
6464
}
6565

6666
export function help() {
67-
console.log('\n', COLOR.heading('Project settings:'), '\n')
67+
console.log('')
68+
console.log(COLOR.heading('Project settings:'), '\n')
69+
70+
console.log(
71+
COLOR.italic(
72+
'A project is a bundle for multiple LiaScript resource into a single project overview page, based on a provided yaml description.\n'
73+
)
74+
)
75+
76+
console.log(
77+
'Learn more: https://www.npmjs.com/package/@liascript/exporter#project \n'
78+
)
79+
console.log('Example:')
80+
console.log(
81+
'- Input: https://github.com/LiaBooks/liabooks.github.com/blob/main/project.yaml'
82+
)
83+
console.log('- Output: https://liabooks.github.io')
84+
console.log('')
6885

6986
COLOR.command(
7087
null,

src/export/rdf.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,20 @@ import fetch from 'node-fetch'
66
import * as COLOR from '../colorize'
77

88
export function help() {
9-
console.log('\n', COLOR.heading('RDF settings:'), '\n')
9+
console.log('')
10+
console.log(COLOR.heading('RDF settings:'), '\n')
11+
12+
console.log(
13+
COLOR.italic(
14+
'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.'
15+
)
16+
)
17+
18+
console.log('\nLearn more:')
19+
console.log('- RDF: https://www.w3.org/RDF/')
20+
console.log('- N-Quads: https://www.w3.org/TR/n-quads/')
21+
console.log('- JSON-LD: https://json-ld.org/')
22+
console.log('')
1023

1124
COLOR.command(
1225
null,

src/export/scorm12.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,17 @@ const path = require('path')
77
const fs = require('fs-extra')
88

99
export function help() {
10-
console.log('\n', COLOR.heading('SCORM settings:'), '\n')
10+
console.log('')
11+
console.log(COLOR.heading('SCORM settings:'), '\n')
12+
13+
console.log(
14+
COLOR.italic(
15+
'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.\n'
16+
)
17+
)
18+
19+
console.log('Learn more: https://scorm.com/scorm-explained/\n')
20+
1121
COLOR.command(
1222
null,
1323
'--scorm-organization',

src/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,14 @@ async function run(argument) {
197197
function help() {
198198
console.log(COLOR.heading('LiaScript-Exporter'))
199199
console.log('')
200+
console.log(
201+
COLOR.italic(
202+
//2345678901234567890123456789012345678901234567890123456789012345678901234567890
203+
'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.'
204+
)
205+
)
206+
console.log('')
207+
200208
COLOR.command('-h', '--help', ' show this help')
201209

202210
COLOR.command('-i', '--input', ' file to be used as input')

0 commit comments

Comments
 (0)