aboutsummaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorpacien2021-06-26 18:08:14 +0200
committerGitHub2021-06-26 18:08:14 +0200
commit153615a69e463ebb859cded5cfe8fb27acd6e722 (patch)
tree0ea6be38d6e94ba9b72e7ff2d78dba015e053537 /compiler
parent005ea7957a75e53b443bbc5a596909df457343b8 (diff)
parent6b125a393d8ce10bfd9273c24ea1615b335abeba (diff)
downloadldgallery-153615a69e463ebb859cded5cfe8fb27acd6e722.tar.gz
Merge pull request #290 from ldgallery/pacien-20210625-trivial-fixes
Diffstat (limited to 'compiler')
-rw-r--r--compiler/app/Main.hs3
-rw-r--r--compiler/src/Input.hs6
2 files changed, 4 insertions, 5 deletions
diff --git a/compiler/app/Main.hs b/compiler/app/Main.hs
index e71e0db..dc97b38 100644
--- a/compiler/app/Main.hs
+++ b/compiler/app/Main.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
@@ -94,6 +94,7 @@ options = Options
94 } 94 }
95 95
96 &= summary ("ldgallery v" ++ showVersion version ++ " - a static web gallery generator with tags") 96 &= summary ("ldgallery v" ++ showVersion version ++ " - a static web gallery generator with tags")
97 &= details ["This software is distributed under the terms of the GNU Affero General Public License v3.0."]
97 &= program "ldgallery" 98 &= program "ldgallery"
98 &= help "Compile a gallery" 99 &= help "Compile a gallery"
99 &= helpArg [explicit, name "h", name "help"] 100 &= helpArg [explicit, name "h", name "help"]
diff --git a/compiler/src/Input.hs b/compiler/src/Input.hs
index 48931ec..4cfabe6 100644
--- a/compiler/src/Input.hs
+++ b/compiler/src/Input.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
@@ -100,9 +100,7 @@ readSidecarFile filepath =
100 100
101 101
102readInputTree :: AnchoredFSNode -> IO InputTree 102readInputTree :: AnchoredFSNode -> IO InputTree
103readInputTree (AnchoredFSNode _ File{}) = 103readInputTree (AnchoredFSNode anchor root) = mkDirNode root
104 throw $ AssertionFailed "Input directory is a file"
105readInputTree (AnchoredFSNode anchor root@Dir{}) = mkDirNode root
106 where 104 where
107 mkInputNode :: Map.Map FileName FSNode -> FSNode -> IO (Maybe InputTree) 105 mkInputNode :: Map.Map FileName FSNode -> FSNode -> IO (Maybe InputTree)
108 mkInputNode dir file@File{path} | not (isSidecar file) && not (isThumbnail file) = 106 mkInputNode dir file@File{path} | not (isSidecar file) && not (isThumbnail file) =