aboutsummaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorpacien2022-10-31 00:14:07 +0100
committerpacien2022-11-19 18:55:31 +0100
commit736520e5e17eee490565c98cd037363fd3e34aed (patch)
tree02c2343877588a3e2967de720ce1d673499eb80e /compiler
parentacef302de422e276261e712241949ce8fb9904d1 (diff)
downloadldgallery-736520e5e17eee490565c98cd037363fd3e34aed.tar.gz
compiler,viewer: register EPUB item type
Diffstat (limited to 'compiler')
-rw-r--r--compiler/src/ItemProcessors.hs5
-rw-r--r--compiler/src/Resource.hs1
2 files changed, 5 insertions, 1 deletions
diff --git a/compiler/src/ItemProcessors.hs b/compiler/src/ItemProcessors.hs
index fa99316..6035477 100644
--- a/compiler/src/ItemProcessors.hs
+++ b/compiler/src/ItemProcessors.hs
@@ -1,7 +1,7 @@
1-- ldgallery - A static generator which turns a collection of tagged 1-- ldgallery - A static generator which turns a collection of tagged
2-- pictures into a searchable web gallery. 2-- pictures into a searchable web gallery.
3-- 3--
4-- Copyright (C) 2019-2021 Pacien TRAN-GIRARD 4-- Copyright (C) 2019-2022 Pacien TRAN-GIRARD
5-- 5--
6-- This program is free software: you can redistribute it and/or modify 6-- This program is free software: you can redistribute it and/or modify
7-- it under the terms of the GNU Affero General Public License as 7-- it under the terms of the GNU Affero General Public License as
@@ -38,6 +38,7 @@ data Format =
38 | PlainTextFormat 38 | PlainTextFormat
39 | MarkdownFormat 39 | MarkdownFormat
40 | PortableDocumentFormat 40 | PortableDocumentFormat
41 | EPUBFormat
41 | VideoFormat 42 | VideoFormat
42 | AudioFormat 43 | AudioFormat
43 | Unknown 44 | Unknown
@@ -59,6 +60,7 @@ formatFromPath =
59 ".txt" -> PlainTextFormat 60 ".txt" -> PlainTextFormat
60 ".md" -> MarkdownFormat 61 ".md" -> MarkdownFormat
61 ".pdf" -> PortableDocumentFormat 62 ".pdf" -> PortableDocumentFormat
63 ".epub" -> EPUBFormat
62 ".wav" -> AudioFormat 64 ".wav" -> AudioFormat
63 ".oga" -> AudioFormat 65 ".oga" -> AudioFormat
64 ".ogg" -> AudioFormat 66 ".ogg" -> AudioFormat
@@ -103,6 +105,7 @@ itemFileProcessor maxResolution =
103 processorFor PlainTextFormat _ = copyResource PlainText 105 processorFor PlainTextFormat _ = copyResource PlainText
104 processorFor MarkdownFormat _ = copyResource Markdown 106 processorFor MarkdownFormat _ = copyResource Markdown
105 processorFor PortableDocumentFormat _ = copyResource PDF 107 processorFor PortableDocumentFormat _ = copyResource PDF
108 processorFor EPUBFormat _ = copyResource EPUB
106 processorFor VideoFormat _ = copyResource Video 109 processorFor VideoFormat _ = copyResource Video
107 processorFor AudioFormat _ = copyResource Audio 110 processorFor AudioFormat _ = copyResource Audio
108 processorFor Unknown _ = copyResource Other 111 processorFor Unknown _ = copyResource Other
diff --git a/compiler/src/Resource.hs b/compiler/src/Resource.hs
index 804c9a1..1868512 100644
--- a/compiler/src/Resource.hs
+++ b/compiler/src/Resource.hs
@@ -92,6 +92,7 @@ data GalleryItemProps =
92 | PlainText { resource :: Resource } 92 | PlainText { resource :: Resource }
93 | Markdown { resource :: Resource } 93 | Markdown { resource :: Resource }
94 | PDF { resource :: Resource } 94 | PDF { resource :: Resource }
95 | EPUB { resource :: Resource }
95 | Video { resource :: Resource } 96 | Video { resource :: Resource }
96 | Audio { resource :: Resource } 97 | Audio { resource :: Resource }
97 | Other { resource :: Resource } 98 | Other { resource :: Resource }