@liascript/exporter 2.5.8--0.10.30 → 2.6.0--0.10.30
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/README.md +162 -0
- package/dist/index.js +1 -1
- package/package.json +3 -1
- package/src/export/helper.ts +23 -0
- package/src/export/rdf.ts +227 -0
- package/src/index.ts +27 -3
package/README.md
CHANGED
|
@@ -134,6 +134,15 @@ Project settings:
|
|
|
134
134
|
--project-category-blur Enable this and the categories will be blurred instead of deleted.
|
|
135
135
|
--project-generate-pdf PDFs are automatically generated and added to every card.
|
|
136
136
|
--project-generate-cache Only generate new files, if they do not exist.
|
|
137
|
+
|
|
138
|
+
RDF settings:
|
|
139
|
+
|
|
140
|
+
--rdf-format Output format n-quads, json-ld (defaults to json-ld).
|
|
141
|
+
--rdf-preview Output the result to the console.
|
|
142
|
+
--rdf-url Refer to an external URL when parsing a local project.
|
|
143
|
+
--rdf-type Course frm schmema.org is applied as default, overwrite this with EducationalResource, etc.
|
|
144
|
+
--rdf-license Add a license-URL, otherwise if url was provided as input, this will check for an existing LICENSE file.
|
|
145
|
+
--rdf-educationalLevel Typically beginner, intermediate or advanced, and formal sets of level indicators.
|
|
137
146
|
```
|
|
138
147
|
|
|
139
148
|
### SCORM1.2
|
|
@@ -674,6 +683,159 @@ Such as, for which projects you want to generate a pdf and pass also all additio
|
|
|
674
683
|
Simply pass all arguments as `arguments` with the long name and without the starting dashes.
|
|
675
684
|
This way you can generate a very detailed project configuration and overview.
|
|
676
685
|
|
|
686
|
+
|
|
687
|
+
### RDF & JSON-LD
|
|
688
|
+
|
|
689
|
+
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 `.np`, depending on the `--rdf-format`
|
|
690
|
+
|
|
691
|
+
``` shell
|
|
692
|
+
liaex --format rdf --rdf-preview -i https://raw.githubusercontent.com/liaScript/docs/master/README.md
|
|
693
|
+
|
|
694
|
+
{
|
|
695
|
+
"@context": "http://schema.org",
|
|
696
|
+
"@id": "https://raw.githubusercontent.com/liaScript/docs/master/README.md",
|
|
697
|
+
"@type": "Course",
|
|
698
|
+
"author": {
|
|
699
|
+
"@type": "Person",
|
|
700
|
+
"email": "LiaScript@web.de",
|
|
701
|
+
"name": "André Dietrich"
|
|
702
|
+
},
|
|
703
|
+
"description": "This document shall provide an entire compendium and course on the development of Open-courSes with [LiaScript](https://LiaScript.github.io). As the language and the systems grows, also this document will be updated. Feel free to fork or copy it, translations are very welcome...",
|
|
704
|
+
"image": {
|
|
705
|
+
"@type": "ImageObject",
|
|
706
|
+
"url": "https://liascript.github.io/img/bg-showcase-1.jpg"
|
|
707
|
+
},
|
|
708
|
+
"inLanguage": "en",
|
|
709
|
+
"name": "LiaScript",
|
|
710
|
+
"url": "https://LiaScript.github.io/course/?https://raw.githubusercontent.com/liaScript/docs/master/README.md",
|
|
711
|
+
"version": "22.0.2"
|
|
712
|
+
}
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
The result as n-quads looks like this:
|
|
716
|
+
|
|
717
|
+
``` shell
|
|
718
|
+
liaex --format rdf --rdf-preview --rdf-format n-quads -i https://raw.githubusercontent.com/liaScript/docs/master/README.md
|
|
719
|
+
|
|
720
|
+
<https://raw.githubusercontent.com/liaScript/docs/master/README.md> <http://schema.org/author> _:b0 .
|
|
721
|
+
<https://raw.githubusercontent.com/liaScript/docs/master/README.md> <http://schema.org/description> "This document shall provide an entire compendium and course on the development of Open-courSes with [LiaScript](https://LiaScript.github.io). As the language and the systems grows, also this document will be updated. Feel free to fork or copy it, translations are very welcome..." .
|
|
722
|
+
<https://raw.githubusercontent.com/liaScript/docs/master/README.md> <http://schema.org/image> _:b1 .
|
|
723
|
+
<https://raw.githubusercontent.com/liaScript/docs/master/README.md> <http://schema.org/inLanguage> "en" .
|
|
724
|
+
<https://raw.githubusercontent.com/liaScript/docs/master/README.md> <http://schema.org/name> "LiaScript" .
|
|
725
|
+
<https://raw.githubusercontent.com/liaScript/docs/master/README.md> <http://schema.org/url> "https://LiaScript.github.io/course/?https://raw.githubusercontent.com/liaScript/docs/master/README.md" .
|
|
726
|
+
<https://raw.githubusercontent.com/liaScript/docs/master/README.md> <http://schema.org/version> "22.0.2" .
|
|
727
|
+
<https://raw.githubusercontent.com/liaScript/docs/master/README.md> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Course> .
|
|
728
|
+
_:b0 <http://schema.org/email> "LiaScript@web.de" .
|
|
729
|
+
_:b0 <http://schema.org/name> "André Dietrich" .
|
|
730
|
+
_:b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person> .
|
|
731
|
+
_:b1 <http://schema.org/url> "https://liascript.github.io/img/bg-showcase-1.jpg" .
|
|
732
|
+
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/ImageObject> .
|
|
733
|
+
```
|
|
734
|
+
|
|
735
|
+
If you are working on a local repository and you want to add the remote URL, you can specify `--rdf-url` and run it with a local file as input:
|
|
736
|
+
|
|
737
|
+
``` shell
|
|
738
|
+
liaex --format rdf --rdf-preview -i ../LiaBooks/docs/README.md --rdf-url https://raw.githubusercontent.com/liaScript/docs/master/README.md
|
|
739
|
+
|
|
740
|
+
{
|
|
741
|
+
"@context": "http://schema.org",
|
|
742
|
+
"@id": "https://raw.githubusercontent.com/liaScript/docs/master/README.md",
|
|
743
|
+
"@type": "Course",
|
|
744
|
+
"author": {
|
|
745
|
+
"@type": "Person",
|
|
746
|
+
"email": "LiaScript@web.de",
|
|
747
|
+
"name": "André Dietrich"
|
|
748
|
+
},
|
|
749
|
+
"description": "This document shall provide an entire compendium and course on the development of Open-courSes with [LiaScript](https://LiaScript.github.io). As the language and the systems grows, also this document will be updated. Feel free to fork or copy it, translations are very welcome...",
|
|
750
|
+
"image": {
|
|
751
|
+
"@type": "ImageObject",
|
|
752
|
+
"url": "https://liascript.github.io/img/bg-showcase-1.jpg"
|
|
753
|
+
},
|
|
754
|
+
"inLanguage": "en",
|
|
755
|
+
"name": "LiaScript",
|
|
756
|
+
"url": "https://LiaScript.github.io/course/?https://raw.githubusercontent.com/liaScript/docs/master/README.md",
|
|
757
|
+
"version": "22.0.2"
|
|
758
|
+
}
|
|
759
|
+
```
|
|
760
|
+
|
|
761
|
+
---
|
|
762
|
+
|
|
763
|
+
Local course but without `--rdf-url`
|
|
764
|
+
|
|
765
|
+
```
|
|
766
|
+
liaex --format rdf --rdf-preview -i ../LiaBooks/docs/README.md
|
|
767
|
+
|
|
768
|
+
{
|
|
769
|
+
"@context": "http://schema.org",
|
|
770
|
+
"@type": "Course",
|
|
771
|
+
"author": {
|
|
772
|
+
"@type": "Person",
|
|
773
|
+
"email": "LiaScript@web.de",
|
|
774
|
+
"name": "André Dietrich"
|
|
775
|
+
},
|
|
776
|
+
"description": "This document shall provide an entire compendium and course on the development of Open-courSes with [LiaScript](https://LiaScript.github.io). As the language and the systems grows, also this document will be updated. Feel free to fork or copy it, translations are very welcome...",
|
|
777
|
+
"image": {
|
|
778
|
+
"@type": "ImageObject",
|
|
779
|
+
"url": "https://liascript.github.io/img/bg-showcase-1.jpg"
|
|
780
|
+
},
|
|
781
|
+
"inLanguage": "en",
|
|
782
|
+
"name": "LiaScript",
|
|
783
|
+
"version": "22.0.2"
|
|
784
|
+
}
|
|
785
|
+
```
|
|
786
|
+
|
|
787
|
+
* `--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...
|
|
788
|
+
* `--rdf-educationalLevel`: This is currently not defined, but can be injected, typically these are beginner, intermediate, advanced, ...
|
|
789
|
+
* `--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.
|
|
790
|
+
|
|
791
|
+
#### What LiaScript meta-information is used
|
|
792
|
+
|
|
793
|
+
``` markdown
|
|
794
|
+
<!--
|
|
795
|
+
author: Your Name
|
|
796
|
+
email: author@email.com
|
|
797
|
+
comment: Some basic information about your course
|
|
798
|
+
version: 12.0.2
|
|
799
|
+
logo: https://someimageURL.jpg
|
|
800
|
+
tags: keyword 1, keyword 2, keyword 3
|
|
801
|
+
language: en
|
|
802
|
+
-->
|
|
803
|
+
|
|
804
|
+
# Title of the course
|
|
805
|
+
...
|
|
806
|
+
|
|
807
|
+
```
|
|
808
|
+
|
|
809
|
+
This will be translated to:
|
|
810
|
+
|
|
811
|
+
``` json
|
|
812
|
+
{
|
|
813
|
+
"@context": "http://schema.org",
|
|
814
|
+
"@id": "https://raw.githubusercontent.com/.../master/README.md",
|
|
815
|
+
"@type": "Course",
|
|
816
|
+
"author": {
|
|
817
|
+
"@type": "Person",
|
|
818
|
+
"email": "author@email.com",
|
|
819
|
+
"name": "Your Name"
|
|
820
|
+
},
|
|
821
|
+
"description": "Some basic information about your course",
|
|
822
|
+
"image": {
|
|
823
|
+
"@type": "ImageObject",
|
|
824
|
+
"url": "https://someimageURL.jpg"
|
|
825
|
+
},
|
|
826
|
+
"inLanguage": "en",
|
|
827
|
+
"name": "Title of the course",
|
|
828
|
+
"url": "https://LiaScript.github.io/course/?https://raw.githubusercontent.com/.../master/README.md",
|
|
829
|
+
"version": "12.0.2",
|
|
830
|
+
"keywords": [
|
|
831
|
+
"keyword 1",
|
|
832
|
+
"keyword 2",
|
|
833
|
+
"keyword 3"
|
|
834
|
+
]
|
|
835
|
+
}
|
|
836
|
+
```
|
|
837
|
+
|
|
838
|
+
|
|
677
839
|
## TODOs & Contributions
|
|
678
840
|
|
|
679
841
|
* Further exporter
|