aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/ItemProcessors.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/src/ItemProcessors.hs')
-rw-r--r--compiler/src/ItemProcessors.hs10
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler/src/ItemProcessors.hs b/compiler/src/ItemProcessors.hs
index f967954..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-2020 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
@@ -36,7 +36,9 @@ import Files
36data Format = 36data Format =
37 PictureFormat 37 PictureFormat
38 | PlainTextFormat 38 | PlainTextFormat
39 | MarkdownFormat
39 | PortableDocumentFormat 40 | PortableDocumentFormat
41 | EPUBFormat
40 | VideoFormat 42 | VideoFormat
41 | AudioFormat 43 | AudioFormat
42 | Unknown 44 | Unknown
@@ -54,9 +56,11 @@ formatFromPath =
54 ".tiff" -> PictureFormat 56 ".tiff" -> PictureFormat
55 ".hdr" -> PictureFormat 57 ".hdr" -> PictureFormat
56 ".gif" -> PictureFormat 58 ".gif" -> PictureFormat
59 ".webp" -> PictureFormat
57 ".txt" -> PlainTextFormat 60 ".txt" -> PlainTextFormat
58 ".md" -> PlainTextFormat -- TODO: handle markdown separately 61 ".md" -> MarkdownFormat
59 ".pdf" -> PortableDocumentFormat 62 ".pdf" -> PortableDocumentFormat
63 ".epub" -> EPUBFormat
60 ".wav" -> AudioFormat 64 ".wav" -> AudioFormat
61 ".oga" -> AudioFormat 65 ".oga" -> AudioFormat
62 ".ogg" -> AudioFormat 66 ".ogg" -> AudioFormat
@@ -99,7 +103,9 @@ itemFileProcessor maxResolution =
99 processorFor PictureFormat Nothing = 103 processorFor PictureFormat Nothing =
100 transformThenDescribe copyFileProcessor getPictureProps 104 transformThenDescribe copyFileProcessor getPictureProps
101 processorFor PlainTextFormat _ = copyResource PlainText 105 processorFor PlainTextFormat _ = copyResource PlainText
106 processorFor MarkdownFormat _ = copyResource Markdown
102 processorFor PortableDocumentFormat _ = copyResource PDF 107 processorFor PortableDocumentFormat _ = copyResource PDF
108 processorFor EPUBFormat _ = copyResource EPUB
103 processorFor VideoFormat _ = copyResource Video 109 processorFor VideoFormat _ = copyResource Video
104 processorFor AudioFormat _ = copyResource Audio 110 processorFor AudioFormat _ = copyResource Audio
105 processorFor Unknown _ = copyResource Other 111 processorFor Unknown _ = copyResource Other