From 736520e5e17eee490565c98cd037363fd3e34aed Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 31 Oct 2022 00:14:07 +0100 Subject: compiler,viewer: register EPUB item type --- compiler/src/ItemProcessors.hs | 5 ++++- compiler/src/Resource.hs | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'compiler') 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 @@ -- ldgallery - A static generator which turns a collection of tagged -- pictures into a searchable web gallery. -- --- Copyright (C) 2019-2021 Pacien TRAN-GIRARD +-- Copyright (C) 2019-2022 Pacien TRAN-GIRARD -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as @@ -38,6 +38,7 @@ data Format = | PlainTextFormat | MarkdownFormat | PortableDocumentFormat + | EPUBFormat | VideoFormat | AudioFormat | Unknown @@ -59,6 +60,7 @@ formatFromPath = ".txt" -> PlainTextFormat ".md" -> MarkdownFormat ".pdf" -> PortableDocumentFormat + ".epub" -> EPUBFormat ".wav" -> AudioFormat ".oga" -> AudioFormat ".ogg" -> AudioFormat @@ -103,6 +105,7 @@ itemFileProcessor maxResolution = processorFor PlainTextFormat _ = copyResource PlainText processorFor MarkdownFormat _ = copyResource Markdown processorFor PortableDocumentFormat _ = copyResource PDF + processorFor EPUBFormat _ = copyResource EPUB processorFor VideoFormat _ = copyResource Video processorFor AudioFormat _ = copyResource Audio 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 = | PlainText { resource :: Resource } | Markdown { resource :: Resource } | PDF { resource :: Resource } + | EPUB { resource :: Resource } | Video { resource :: Resource } | Audio { resource :: Resource } | Other { resource :: Resource } -- cgit v1.2.3