Skip to content

Commit

Permalink
Add constants for bloomd format
Browse files Browse the repository at this point in the history
  • Loading branch information
nikkuAg committed Jul 24, 2024
1 parent 78597f0 commit a12be97
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions le_utils/constants/content_kinds.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
file_formats.H5P: H5P,
file_formats.ZIM: ZIM,
file_formats.BLOOMPUB: DOCUMENT,
file_formats.BLOOMD: DOCUMENT,
}


Expand Down
2 changes: 2 additions & 0 deletions le_utils/constants/file_formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@

# constants for bloomPub format
BLOOMPUB = "bloompub"
BLOOMD = "bloomd"
BLOOMPUB_MIMETYPE = "application/bloompub+zip"

choices = (
Expand All @@ -99,6 +100,7 @@
(ZIM, "ZIM"),
(EPUB, "ePub Document"),
(BLOOMPUB, "Bloom Document"),
(BLOOMD, "Bloom Document"),
)


Expand Down
1 change: 1 addition & 0 deletions le_utils/constants/file_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
file_formats.PDF: DOCUMENT,
file_formats.EPUB: EPUB,
file_formats.BLOOMPUB: BLOOMPUB,
file_formats.BLOOMD: BLOOMPUB,
#
# formats HTMLZipFile
file_formats.HTML5: HTML5,
Expand Down
2 changes: 2 additions & 0 deletions le_utils/constants/format_presets.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
DOCUMENT_THUMBNAIL = "document_thumbnail"
DOCUMENT_THUMBNAIL_READABLE = "Thumbnail"
BLOOMPUB = "bloompub"
BLOOMD = "bloomd"
BLOOMPUB_READABLE = "Bloom Document"

EXERCISE = "exercise"
Expand Down Expand Up @@ -121,6 +122,7 @@
(SLIDESHOW_MANIFEST, SLIDESHOW_MANIFEST_READABLE),
(IMSCP_ZIP, IMSCP_ZIP_READABLE),
(BLOOMPUB, BLOOMPUB_READABLE),
(BLOOMD, BLOOMPUB_READABLE),
)


Expand Down
3 changes: 3 additions & 0 deletions le_utils/resources/formatlookup.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,8 @@
},
"bloompub": {
"mimetype": "application/bloompub+zip"
},
"bloomd": {
"mimetype": "application/bloompub+zip"
}
}
2 changes: 1 addition & 1 deletion le_utils/resources/presetlookup.json
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@
"display": true,
"order": 1,
"kind": "document",
"allowed_formats": ["bloompub"],
"allowed_formats": ["bloompub", "bloomd"],
"convertible_formats": []
}
}

0 comments on commit a12be97

Please # to comment.