Skip to content

Commit

Permalink
Merge pull request #139 from nikkuAg/bloomd
Browse files Browse the repository at this point in the history
Add constants for bloomd format
  • Loading branch information
rtibbles authored Aug 30, 2024
2 parents 78597f0 + 357f2cc commit 238bbde
Show file tree
Hide file tree
Showing 5 changed files with 8 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
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 238bbde

Please sign in to comment.