le-utils 0.2.4__tar.gz → 0.2.6__tar.gz
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.
- {le-utils-0.2.4/le_utils.egg-info → le-utils-0.2.6}/PKG-INFO +1 -1
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/constants/content_kinds.py +1 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/constants/embed_content_request.py +56 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/constants/embed_topics_request.py +33 -13
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/constants/file_formats.py +5 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/constants/file_types.py +2 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/constants/format_presets.py +3 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/resources/formatlookup.json +3 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/resources/presetlookup.json +12 -0
- {le-utils-0.2.4 → le-utils-0.2.6/le_utils.egg-info}/PKG-INFO +1 -1
- {le-utils-0.2.4 → le-utils-0.2.6}/setup.py +1 -1
- {le-utils-0.2.4 → le-utils-0.2.6}/LICENSE.txt +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/MANIFEST.in +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/README.md +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/__init__.py +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/constants/__init__.py +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/constants/completion_criteria.py +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/constants/exercises.py +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/constants/labels/__init__.py +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/constants/labels/accessibility_categories.py +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/constants/labels/learning_activities.py +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/constants/labels/levels.py +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/constants/labels/needs.py +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/constants/labels/resource_type.py +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/constants/labels/subjects.py +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/constants/languages.py +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/constants/licenses.py +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/constants/mastery_criteria.py +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/constants/modalities.py +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/constants/roles.py +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/constants/uuid.py +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/humanhash.py +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/proquint.py +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/resources/kindlookup.json +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/resources/languagelookup.json +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/resources/licenselookup.json +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/uuidv5.py +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/validators/__init__.py +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/validators/embed_content_request.py +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils/validators/embed_topics_request.py +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils.egg-info/SOURCES.txt +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils.egg-info/dependency_links.txt +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils.egg-info/requires.txt +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/le_utils.egg-info/top_level.txt +0 -0
- {le-utils-0.2.4 → le-utils-0.2.6}/setup.cfg +0 -0
|
@@ -21,6 +21,57 @@ SCHEMA = {
|
|
|
21
21
|
"description": "Language code from https://github.com/learningequality/le-utils/blob/main/le_utils/resources/languagelookup.json",
|
|
22
22
|
"pattern": "^[a-z]{2,3}(?:-[a-zA-Z]+)?$",
|
|
23
23
|
},
|
|
24
|
+
"url": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"pattern": "^(https?:\\/\\/(?:storage\\.cloud\\.google\\.com|localhost(?::[0-9]+)?)\\/[a-z0-9-._~!$&'()*+,;=:@%\\/\\?]+)$",
|
|
27
|
+
},
|
|
28
|
+
"preset": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "Presets from https://github.com/learningequality/le-utils/blob/main/le_utils/constants/format_presets.py",
|
|
31
|
+
"enum": [
|
|
32
|
+
"high_res_video",
|
|
33
|
+
"low_res_video",
|
|
34
|
+
"video_thumbnail",
|
|
35
|
+
"video_subtitle",
|
|
36
|
+
"video_dependency",
|
|
37
|
+
"audio",
|
|
38
|
+
"audio_thumbnail",
|
|
39
|
+
"audio_dependency",
|
|
40
|
+
"document",
|
|
41
|
+
"epub",
|
|
42
|
+
"document_thumbnail",
|
|
43
|
+
"exercise",
|
|
44
|
+
"exercise_thumbnail",
|
|
45
|
+
"exercise_image",
|
|
46
|
+
"exercise_graphie",
|
|
47
|
+
"channel_thumbnail",
|
|
48
|
+
"topic_thumbnail",
|
|
49
|
+
"html5_zip",
|
|
50
|
+
"html5_dependency",
|
|
51
|
+
"html5_thumbnail",
|
|
52
|
+
"h5p",
|
|
53
|
+
"h5p_thumbnail",
|
|
54
|
+
"zim",
|
|
55
|
+
"zim_thumbnail",
|
|
56
|
+
"qti",
|
|
57
|
+
"qti_thumbnail",
|
|
58
|
+
"slideshow_image",
|
|
59
|
+
"slideshow_thumbnail",
|
|
60
|
+
"slideshow_manifest",
|
|
61
|
+
"imscp_zip",
|
|
62
|
+
"bloompub",
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
"file": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"additionalProperties": False,
|
|
68
|
+
"properties": {
|
|
69
|
+
"url": {"$ref": "#/definitions/url"},
|
|
70
|
+
"preset": {"$ref": "#/definitions/preset"},
|
|
71
|
+
"language": {"$ref": "#/definitions/language"},
|
|
72
|
+
},
|
|
73
|
+
"required": ["url", "preset"],
|
|
74
|
+
},
|
|
24
75
|
"resource": {
|
|
25
76
|
"type": "object",
|
|
26
77
|
"description": "The key textual metadata and data for a content resource",
|
|
@@ -43,6 +94,11 @@ SCHEMA = {
|
|
|
43
94
|
"description": "The cleaned up text extracted from the content resource (in markdown or plaintext format)",
|
|
44
95
|
},
|
|
45
96
|
"language": {"$ref": "#/definitions/language"},
|
|
97
|
+
"files": {
|
|
98
|
+
"type": "array",
|
|
99
|
+
"description": "A list of files associated with the content resource",
|
|
100
|
+
"items": {"$ref": "#/definitions/file"},
|
|
101
|
+
},
|
|
46
102
|
},
|
|
47
103
|
"required": ["id", "title", "description", "text"],
|
|
48
104
|
},
|
|
@@ -16,30 +16,50 @@ SCHEMA = {
|
|
|
16
16
|
"description": "Schema for embed topics requests received by RayServe",
|
|
17
17
|
"additionalProperties": False,
|
|
18
18
|
"definitions": {
|
|
19
|
-
"
|
|
20
|
-
"type": "
|
|
21
|
-
"description": "The
|
|
22
|
-
|
|
19
|
+
"id": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "The ID of the topic content node on Studio",
|
|
22
|
+
},
|
|
23
|
+
"title": {"type": "string", "description": "The title of the topic"},
|
|
24
|
+
"description": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "The description of the topic",
|
|
23
27
|
},
|
|
24
28
|
"language": {
|
|
25
29
|
"type": "string",
|
|
26
30
|
"description": "Language code from https://github.com/learningequality/le-utils/blob/main/le_utils/resources/languagelookup.json",
|
|
27
31
|
"pattern": "^[a-z]{2,3}(?:-[a-zA-Z]+)?$",
|
|
28
32
|
},
|
|
33
|
+
"level": {
|
|
34
|
+
"type": "integer",
|
|
35
|
+
"description": "The level of the ancestor, where the root is 0 and the parent is the highest level",
|
|
36
|
+
},
|
|
37
|
+
"ancestor": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"description": "An ancestor in the tree structure",
|
|
40
|
+
"additionalProperties": False,
|
|
41
|
+
"properties": {
|
|
42
|
+
"id": {"$ref": "#/definitions/id"},
|
|
43
|
+
"title": {"$ref": "#/definitions/title"},
|
|
44
|
+
"description": {"$ref": "#/definitions/description"},
|
|
45
|
+
"language": {"$ref": "#/definitions/language"},
|
|
46
|
+
"level": {"$ref": "#/definitions/level"},
|
|
47
|
+
},
|
|
48
|
+
"required": ["id", "title", "description", "level"],
|
|
49
|
+
},
|
|
50
|
+
"ancestors": {
|
|
51
|
+
"type": "array",
|
|
52
|
+
"description": "The ancestors of the topic. Please see 'level' in the ancestor schema for more information",
|
|
53
|
+
"items": {"$ref": "#/definitions/ancestor"},
|
|
54
|
+
},
|
|
29
55
|
"topic": {
|
|
30
56
|
"type": "object",
|
|
31
57
|
"description": "A topic in the tree structure",
|
|
32
58
|
"additionalProperties": False,
|
|
33
59
|
"properties": {
|
|
34
|
-
"id": {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
"title": {"type": "string", "description": "The title of the topic"},
|
|
39
|
-
"description": {
|
|
40
|
-
"type": "string",
|
|
41
|
-
"description": "The description of the topic",
|
|
42
|
-
},
|
|
60
|
+
"id": {"$ref": "#/definitions/id"},
|
|
61
|
+
"title": {"$ref": "#/definitions/title"},
|
|
62
|
+
"description": {"$ref": "#/definitions/description"},
|
|
43
63
|
"language": {"$ref": "#/definitions/language"},
|
|
44
64
|
"ancestors": {"$ref": "#/definitions/ancestors"},
|
|
45
65
|
},
|
|
@@ -76,6 +76,10 @@ ZIM_MIMETYPE = ".zim"
|
|
|
76
76
|
EPUB = "epub"
|
|
77
77
|
EPUB_MIMETYPE = "application/epub+zip"
|
|
78
78
|
|
|
79
|
+
# constants for bloomPub format
|
|
80
|
+
BLOOMPUB = "bloompub"
|
|
81
|
+
BLOOMPUB_MIMETYPE = "application/bloompub+zip"
|
|
82
|
+
|
|
79
83
|
choices = (
|
|
80
84
|
(MP4, "MP4 Video"),
|
|
81
85
|
(WEBM, "WEBM Video"),
|
|
@@ -94,6 +98,7 @@ choices = (
|
|
|
94
98
|
(H5P, "H5P"),
|
|
95
99
|
(ZIM, "ZIM"),
|
|
96
100
|
(EPUB, "ePub Document"),
|
|
101
|
+
(BLOOMPUB, "Bloom Document"),
|
|
97
102
|
)
|
|
98
103
|
|
|
99
104
|
|
|
@@ -12,6 +12,7 @@ ZIM = "zim"
|
|
|
12
12
|
THUMBNAIL = "thumbnail"
|
|
13
13
|
SUBTITLES = "subtitles"
|
|
14
14
|
SLIDESHOW_IMAGE = "slideshow_image"
|
|
15
|
+
BLOOMPUB = "bloompub"
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
""" File Format (extension) to File Type Mapping """
|
|
@@ -28,6 +29,7 @@ MAPPING = {
|
|
|
28
29
|
# DocumentFile formats
|
|
29
30
|
file_formats.PDF: DOCUMENT,
|
|
30
31
|
file_formats.EPUB: EPUB,
|
|
32
|
+
file_formats.BLOOMPUB: BLOOMPUB,
|
|
31
33
|
#
|
|
32
34
|
# formats HTMLZipFile
|
|
33
35
|
file_formats.HTML5: HTML5,
|
|
@@ -34,6 +34,8 @@ EPUB = "epub"
|
|
|
34
34
|
EPUB_READABLE = "ePub Document"
|
|
35
35
|
DOCUMENT_THUMBNAIL = "document_thumbnail"
|
|
36
36
|
DOCUMENT_THUMBNAIL_READABLE = "Thumbnail"
|
|
37
|
+
BLOOMPUB = "bloompub"
|
|
38
|
+
BLOOMPUB_READABLE = "Bloom Document"
|
|
37
39
|
|
|
38
40
|
EXERCISE = "exercise"
|
|
39
41
|
EXERCISE_READABLE = "Exercise"
|
|
@@ -118,6 +120,7 @@ choices = (
|
|
|
118
120
|
(SLIDESHOW_THUMBNAIL, SLIDESHOW_THUMBNAIL_READABLE),
|
|
119
121
|
(SLIDESHOW_MANIFEST, SLIDESHOW_MANIFEST_READABLE),
|
|
120
122
|
(IMSCP_ZIP, IMSCP_ZIP_READABLE),
|
|
123
|
+
(BLOOMPUB, BLOOMPUB_READABLE),
|
|
121
124
|
)
|
|
122
125
|
|
|
123
126
|
|
|
@@ -358,5 +358,17 @@
|
|
|
358
358
|
"kind": "slideshow",
|
|
359
359
|
"allowed_formats": ["json"],
|
|
360
360
|
"convertible_formats": []
|
|
361
|
+
},
|
|
362
|
+
"bloompub": {
|
|
363
|
+
"readable_name": "Bloom Document",
|
|
364
|
+
"multi_language": false,
|
|
365
|
+
"supplementary": false,
|
|
366
|
+
"thumbnail": false,
|
|
367
|
+
"subtitle": false,
|
|
368
|
+
"display": true,
|
|
369
|
+
"order": 1,
|
|
370
|
+
"kind": "document",
|
|
371
|
+
"allowed_formats": ["bloompub"],
|
|
372
|
+
"convertible_formats": []
|
|
361
373
|
}
|
|
362
374
|
}
|
|
@@ -12,7 +12,7 @@ lang_utils_requirements = [
|
|
|
12
12
|
setup(
|
|
13
13
|
name="le-utils",
|
|
14
14
|
packages=find_packages(),
|
|
15
|
-
version="0.2.
|
|
15
|
+
version="0.2.6",
|
|
16
16
|
description="LE-Utils contains shared constants used in Kolibri, Ricecooker, and Kolibri Studio.",
|
|
17
17
|
long_description=long_description,
|
|
18
18
|
long_description_content_type="text/markdown",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|