diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/src/ItemProcessors.hs | 6 | ||||
-rw-r--r-- | compiler/src/Resource.hs | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/compiler/src/ItemProcessors.hs b/compiler/src/ItemProcessors.hs index 476b7d7..fa99316 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-2021 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,6 +36,7 @@ import Files | |||
36 | data Format = | 36 | data Format = |
37 | PictureFormat | 37 | PictureFormat |
38 | | PlainTextFormat | 38 | | PlainTextFormat |
39 | | MarkdownFormat | ||
39 | | PortableDocumentFormat | 40 | | PortableDocumentFormat |
40 | | VideoFormat | 41 | | VideoFormat |
41 | | AudioFormat | 42 | | AudioFormat |
@@ -56,7 +57,7 @@ formatFromPath = | |||
56 | ".gif" -> PictureFormat | 57 | ".gif" -> PictureFormat |
57 | ".webp" -> PictureFormat | 58 | ".webp" -> PictureFormat |
58 | ".txt" -> PlainTextFormat | 59 | ".txt" -> PlainTextFormat |
59 | ".md" -> PlainTextFormat -- TODO: handle markdown separately | 60 | ".md" -> MarkdownFormat |
60 | ".pdf" -> PortableDocumentFormat | 61 | ".pdf" -> PortableDocumentFormat |
61 | ".wav" -> AudioFormat | 62 | ".wav" -> AudioFormat |
62 | ".oga" -> AudioFormat | 63 | ".oga" -> AudioFormat |
@@ -100,6 +101,7 @@ itemFileProcessor maxResolution = | |||
100 | processorFor PictureFormat Nothing = | 101 | processorFor PictureFormat Nothing = |
101 | transformThenDescribe copyFileProcessor getPictureProps | 102 | transformThenDescribe copyFileProcessor getPictureProps |
102 | processorFor PlainTextFormat _ = copyResource PlainText | 103 | processorFor PlainTextFormat _ = copyResource PlainText |
104 | processorFor MarkdownFormat _ = copyResource Markdown | ||
103 | processorFor PortableDocumentFormat _ = copyResource PDF | 105 | processorFor PortableDocumentFormat _ = copyResource PDF |
104 | processorFor VideoFormat _ = copyResource Video | 106 | processorFor VideoFormat _ = copyResource Video |
105 | processorFor AudioFormat _ = copyResource Audio | 107 | processorFor AudioFormat _ = copyResource Audio |
diff --git a/compiler/src/Resource.hs b/compiler/src/Resource.hs index f59eed6..804c9a1 100644 --- a/compiler/src/Resource.hs +++ b/compiler/src/Resource.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-2021 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 |
@@ -90,6 +90,7 @@ data GalleryItemProps = | |||
90 | { resource :: Resource | 90 | { resource :: Resource |
91 | , resolution :: Resolution } | 91 | , resolution :: Resolution } |
92 | | PlainText { resource :: Resource } | 92 | | PlainText { resource :: Resource } |
93 | | Markdown { resource :: Resource } | ||
93 | | PDF { resource :: Resource } | 94 | | PDF { resource :: Resource } |
94 | | Video { resource :: Resource } | 95 | | Video { resource :: Resource } |
95 | | Audio { resource :: Resource } | 96 | | Audio { resource :: Resource } |