le-utils 0.2.5__tar.gz → 0.2.7__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.
Files changed (45) hide show
  1. {le-utils-0.2.5/le_utils.egg-info → le-utils-0.2.7}/PKG-INFO +1 -1
  2. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/constants/content_kinds.py +2 -0
  3. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/constants/embed_content_request.py +56 -0
  4. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/constants/file_formats.py +7 -0
  5. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/constants/file_types.py +3 -0
  6. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/constants/format_presets.py +3 -0
  7. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/resources/formatlookup.json +6 -0
  8. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/resources/presetlookup.json +12 -0
  9. {le-utils-0.2.5 → le-utils-0.2.7/le_utils.egg-info}/PKG-INFO +1 -1
  10. {le-utils-0.2.5 → le-utils-0.2.7}/setup.py +1 -1
  11. {le-utils-0.2.5 → le-utils-0.2.7}/LICENSE.txt +0 -0
  12. {le-utils-0.2.5 → le-utils-0.2.7}/MANIFEST.in +0 -0
  13. {le-utils-0.2.5 → le-utils-0.2.7}/README.md +0 -0
  14. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/__init__.py +0 -0
  15. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/constants/__init__.py +0 -0
  16. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/constants/completion_criteria.py +0 -0
  17. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/constants/embed_topics_request.py +0 -0
  18. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/constants/exercises.py +0 -0
  19. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/constants/labels/__init__.py +0 -0
  20. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/constants/labels/accessibility_categories.py +0 -0
  21. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/constants/labels/learning_activities.py +0 -0
  22. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/constants/labels/levels.py +0 -0
  23. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/constants/labels/needs.py +0 -0
  24. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/constants/labels/resource_type.py +0 -0
  25. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/constants/labels/subjects.py +0 -0
  26. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/constants/languages.py +0 -0
  27. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/constants/licenses.py +0 -0
  28. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/constants/mastery_criteria.py +0 -0
  29. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/constants/modalities.py +0 -0
  30. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/constants/roles.py +0 -0
  31. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/constants/uuid.py +0 -0
  32. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/humanhash.py +0 -0
  33. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/proquint.py +0 -0
  34. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/resources/kindlookup.json +0 -0
  35. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/resources/languagelookup.json +0 -0
  36. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/resources/licenselookup.json +0 -0
  37. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/uuidv5.py +0 -0
  38. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/validators/__init__.py +0 -0
  39. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/validators/embed_content_request.py +0 -0
  40. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils/validators/embed_topics_request.py +0 -0
  41. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils.egg-info/SOURCES.txt +0 -0
  42. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils.egg-info/dependency_links.txt +0 -0
  43. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils.egg-info/requires.txt +0 -0
  44. {le-utils-0.2.5 → le-utils-0.2.7}/le_utils.egg-info/top_level.txt +0 -0
  45. {le-utils-0.2.5 → le-utils-0.2.7}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: le-utils
3
- Version: 0.2.5
3
+ Version: 0.2.7
4
4
  Summary: LE-Utils contains shared constants used in Kolibri, Ricecooker, and Kolibri Studio.
5
5
  Home-page: https://github.com/learningequality/le-utils
6
6
  Author: Learning Equality
@@ -43,6 +43,8 @@ MAPPING = {
43
43
  file_formats.HTML5: HTML5,
44
44
  file_formats.H5P: H5P,
45
45
  file_formats.ZIM: ZIM,
46
+ file_formats.BLOOMPUB: DOCUMENT,
47
+ file_formats.BLOOMD: DOCUMENT,
46
48
  }
47
49
 
48
50
 
@@ -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
  },
@@ -76,6 +76,11 @@ 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
+ BLOOMD = "bloomd"
82
+ BLOOMPUB_MIMETYPE = "application/bloompub+zip"
83
+
79
84
  choices = (
80
85
  (MP4, "MP4 Video"),
81
86
  (WEBM, "WEBM Video"),
@@ -94,6 +99,8 @@ choices = (
94
99
  (H5P, "H5P"),
95
100
  (ZIM, "ZIM"),
96
101
  (EPUB, "ePub Document"),
102
+ (BLOOMPUB, "Bloom Document"),
103
+ (BLOOMD, "Bloom Document"),
97
104
  )
98
105
 
99
106
 
@@ -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,8 @@ MAPPING = {
28
29
  # DocumentFile formats
29
30
  file_formats.PDF: DOCUMENT,
30
31
  file_formats.EPUB: EPUB,
32
+ file_formats.BLOOMPUB: BLOOMPUB,
33
+ file_formats.BLOOMD: BLOOMPUB,
31
34
  #
32
35
  # formats HTMLZipFile
33
36
  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
 
@@ -49,5 +49,11 @@
49
49
  },
50
50
  "zip": {
51
51
  "mimetype": ".zip"
52
+ },
53
+ "bloompub": {
54
+ "mimetype": "application/bloompub+zip"
55
+ },
56
+ "bloomd": {
57
+ "mimetype": "application/bloompub+zip"
52
58
  }
53
59
  }
@@ -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", "bloomd"],
372
+ "convertible_formats": []
361
373
  }
362
374
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: le-utils
3
- Version: 0.2.5
3
+ Version: 0.2.7
4
4
  Summary: LE-Utils contains shared constants used in Kolibri, Ricecooker, and Kolibri Studio.
5
5
  Home-page: https://github.com/learningequality/le-utils
6
6
  Author: Learning Equality
@@ -12,7 +12,7 @@ lang_utils_requirements = [
12
12
  setup(
13
13
  name="le-utils",
14
14
  packages=find_packages(),
15
- version="0.2.5",
15
+ version="0.2.7",
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