From bbae6ddb97c0825f6b0b689f4d9eeac67515d1c1 Mon Sep 17 00:00:00 2001 From: pacien Date: Sat, 21 Dec 2019 19:28:58 +0100 Subject: compiler: init stack project --- compiler/package.yaml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 compiler/package.yaml (limited to 'compiler/package.yaml') diff --git a/compiler/package.yaml b/compiler/package.yaml new file mode 100644 index 0000000..7cd0178 --- /dev/null +++ b/compiler/package.yaml @@ -0,0 +1,48 @@ +name: ldgallery-compiler +version: 0.1.0.0 +github: "githubuser/ldgallery-compiler" +license: BSD3 +author: "Author name here" +maintainer: "example@example.com" +copyright: "2019 Author name here" + +extra-source-files: +- README.md +- ChangeLog.md + +# Metadata used when publishing your package +# synopsis: Short description of your package +# category: Web + +# To avoid duplicated efforts in documentation and dealing with the +# complications of embedding Haddock markup inside cabal files, it is +# common to point users to the README.md file. +description: Please see the README on GitHub at + +dependencies: +- base >= 4.7 && < 5 + +library: + source-dirs: src + +executables: + ldgallery-compiler-exe: + main: Main.hs + source-dirs: app + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N + dependencies: + - ldgallery-compiler + +tests: + ldgallery-compiler-test: + main: Spec.hs + source-dirs: test + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N + dependencies: + - ldgallery-compiler -- cgit v1.2.3 From 8de4411269ae85789c1cc7d81a9ecf0facbe78ff Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 23 Dec 2019 05:09:25 +0100 Subject: compiler: add base structures and encoding --- compiler/package.yaml | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'compiler/package.yaml') diff --git a/compiler/package.yaml b/compiler/package.yaml index 7cd0178..f2a319e 100644 --- a/compiler/package.yaml +++ b/compiler/package.yaml @@ -1,26 +1,30 @@ name: ldgallery-compiler version: 0.1.0.0 -github: "githubuser/ldgallery-compiler" -license: BSD3 -author: "Author name here" -maintainer: "example@example.com" -copyright: "2019 Author name here" +github: "pacien/ldgallery" +license: AGPL-3 +author: "Pacien TRAN-GIRARD, Guillaume FOUET" +maintainer: "" +copyright: "2019 Pacien TRAN-GIRARD, Guillaume FOUET" extra-source-files: -- README.md -- ChangeLog.md +- readme.md # Metadata used when publishing your package -# synopsis: Short description of your package -# category: Web - -# To avoid duplicated efforts in documentation and dealing with the -# complications of embedding Haddock markup inside cabal files, it is -# common to point users to the README.md file. -description: Please see the README on GitHub at +synopsis: A static generator which turns a collection of tagged pictures into a searchable web gallery +category: Web +description: Please see the README on GitHub at dependencies: - base >= 4.7 && < 5 +- text +- optparse-applicative +- cmdargs +- filepath +- directory +- directory-tree +- aeson +- yaml +- JuicyPixels library: source-dirs: src -- cgit v1.2.3 From 81cfb110248a8f98cd084533f00a98a507d9518b Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 23 Dec 2019 07:39:27 +0100 Subject: compiler: fix item tree tag aggregation and path concat --- compiler/package.yaml | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/package.yaml') diff --git a/compiler/package.yaml b/compiler/package.yaml index f2a319e..253f16a 100644 --- a/compiler/package.yaml +++ b/compiler/package.yaml @@ -17,6 +17,7 @@ description: Please see the README on GitHub at = 4.7 && < 5 - text +- containers - optparse-applicative - cmdargs - filepath -- cgit v1.2.3 From 0b2f6fb420d213b4ee718b9ac79cc3f9fa7678d5 Mon Sep 17 00:00:00 2001 From: pacien Date: Wed, 25 Dec 2019 21:04:31 +0100 Subject: compiler: refactor transform stages --- compiler/package.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'compiler/package.yaml') diff --git a/compiler/package.yaml b/compiler/package.yaml index 253f16a..9266466 100644 --- a/compiler/package.yaml +++ b/compiler/package.yaml @@ -16,16 +16,16 @@ description: Please see the README on GitHub at = 4.7 && < 5 -- text +#- text - containers -- optparse-applicative -- cmdargs - filepath - directory -- directory-tree - aeson - yaml -- JuicyPixels +#- optparse-applicative +#- cmdargs +#- JuicyPixels +#- JuicyPixels-extra library: source-dirs: src -- cgit v1.2.3 From eb7a652b2244ffa4dd5ba2440b7879127e7c6078 Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 27 Dec 2019 10:08:19 +0100 Subject: compiler: implement resource processing but break directory cleanup --- compiler/package.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'compiler/package.yaml') diff --git a/compiler/package.yaml b/compiler/package.yaml index 9266466..85740ab 100644 --- a/compiler/package.yaml +++ b/compiler/package.yaml @@ -16,7 +16,6 @@ description: Please see the README on GitHub at = 4.7 && < 5 -#- text - containers - filepath - directory @@ -24,8 +23,8 @@ dependencies: - yaml #- optparse-applicative #- cmdargs -#- JuicyPixels -#- JuicyPixels-extra +- JuicyPixels +- JuicyPixels-extra library: source-dirs: src -- cgit v1.2.3 From c3f1d45743e274f588e5a23ba25e1fc124728c11 Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 27 Dec 2019 11:07:58 +0100 Subject: compiler: add command line interface --- compiler/package.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'compiler/package.yaml') diff --git a/compiler/package.yaml b/compiler/package.yaml index 85740ab..e3c1eb6 100644 --- a/compiler/package.yaml +++ b/compiler/package.yaml @@ -21,8 +21,7 @@ dependencies: - directory - aeson - yaml -#- optparse-applicative -#- cmdargs +- optparse-applicative - JuicyPixels - JuicyPixels-extra -- cgit v1.2.3 From 63b06627f200f155f66ecdb6c5f41ab44808dd6b Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 27 Dec 2019 12:38:01 +0100 Subject: compiler: add compiler config keys --- compiler/package.yaml | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/package.yaml') diff --git a/compiler/package.yaml b/compiler/package.yaml index e3c1eb6..b594ee7 100644 --- a/compiler/package.yaml +++ b/compiler/package.yaml @@ -19,6 +19,7 @@ dependencies: - containers - filepath - directory +- text - aeson - yaml - optparse-applicative -- cgit v1.2.3 From 45df822904cd1759ea4be4bf0c125d8fb6542479 Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 27 Dec 2019 14:44:07 +0100 Subject: compiler: switch to cmdargs --- compiler/package.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/package.yaml') diff --git a/compiler/package.yaml b/compiler/package.yaml index b594ee7..21677fb 100644 --- a/compiler/package.yaml +++ b/compiler/package.yaml @@ -22,7 +22,7 @@ dependencies: - text - aeson - yaml -- optparse-applicative +- cmdargs - JuicyPixels - JuicyPixels-extra -- cgit v1.2.3 From a8cdc6eba4ba496bec816dcb7f3c2c0f5114f4c8 Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 27 Dec 2019 15:35:42 +0100 Subject: compiler: enable parallelisation --- compiler/package.yaml | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/package.yaml') diff --git a/compiler/package.yaml b/compiler/package.yaml index 21677fb..90c4ea5 100644 --- a/compiler/package.yaml +++ b/compiler/package.yaml @@ -25,6 +25,7 @@ dependencies: - cmdargs - JuicyPixels - JuicyPixels-extra +- parallel-io library: source-dirs: src -- cgit v1.2.3 From 641ea85d4da795cb2c67d9777cb3db3dfede1d8b Mon Sep 17 00:00:00 2001 From: pacien Date: Tue, 31 Dec 2019 06:58:53 +0100 Subject: compiler: add option to include static web app in the output GitHub: closes #6 --- compiler/package.yaml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compiler/package.yaml') diff --git a/compiler/package.yaml b/compiler/package.yaml index 90c4ea5..0b03887 100644 --- a/compiler/package.yaml +++ b/compiler/package.yaml @@ -27,6 +27,9 @@ dependencies: - JuicyPixels-extra - parallel-io +data-dir: data +data-files: ["**/*"] + library: source-dirs: src -- cgit v1.2.3 From 6691b14cf4e867a9018f38c174fa98f1ada19f82 Mon Sep 17 00:00:00 2001 From: pacien Date: Tue, 31 Dec 2019 08:38:15 +0100 Subject: compiler: add option to ignore files matching a regex GitHub: closes #10 --- compiler/package.yaml | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/package.yaml') diff --git a/compiler/package.yaml b/compiler/package.yaml index 0b03887..0577bb5 100644 --- a/compiler/package.yaml +++ b/compiler/package.yaml @@ -26,6 +26,7 @@ dependencies: - JuicyPixels - JuicyPixels-extra - parallel-io +- regex-compat data-dir: data data-files: ["**/*"] -- cgit v1.2.3 From 9dd271504160b624284dbc438cdc867b6ca0d0e7 Mon Sep 17 00:00:00 2001 From: pacien Date: Sun, 5 Jan 2020 16:24:02 +0100 Subject: compiler: enable warnings and fix them GitHub: fixes #9 --- compiler/package.yaml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'compiler/package.yaml') diff --git a/compiler/package.yaml b/compiler/package.yaml index 0577bb5..f93c146 100644 --- a/compiler/package.yaml +++ b/compiler/package.yaml @@ -28,6 +28,13 @@ dependencies: - parallel-io - regex-compat +ghc-options: +- -Wall +- -Wcompat +- -Widentities +- -Wincomplete-uni-patterns +- -Wredundant-constraints + data-dir: data data-files: ["**/*"] -- cgit v1.2.3 From ee222b40569b9f40c482dd9df518f6445c1c304d Mon Sep 17 00:00:00 2001 From: pacien Date: Sun, 5 Jan 2020 16:42:09 +0100 Subject: compiler: enable language extensions on whole project --- compiler/package.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'compiler/package.yaml') diff --git a/compiler/package.yaml b/compiler/package.yaml index f93c146..f7fb22a 100644 --- a/compiler/package.yaml +++ b/compiler/package.yaml @@ -28,6 +28,15 @@ dependencies: - parallel-io - regex-compat +default-extensions: +- DuplicateRecordFields +- DeriveGeneric +- DeriveDataTypeable +- DeriveAnyClass +- FlexibleContexts +- NamedFieldPuns +- OverloadedStrings + ghc-options: - -Wall - -Wcompat -- cgit v1.2.3 From efbbc6df28a2f51f087c33c9b81646b68a338205 Mon Sep 17 00:00:00 2001 From: pacien Date: Sun, 5 Jan 2020 16:42:26 +0100 Subject: compiler: turn warnings into errors --- compiler/package.yaml | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/package.yaml') diff --git a/compiler/package.yaml b/compiler/package.yaml index f7fb22a..18d8a33 100644 --- a/compiler/package.yaml +++ b/compiler/package.yaml @@ -38,6 +38,7 @@ default-extensions: - OverloadedStrings ghc-options: +- -Werror - -Wall - -Wcompat - -Widentities -- cgit v1.2.3 From 1e3a0e39cb6cdc86a6ba6b570c72c44931cf1c3b Mon Sep 17 00:00:00 2001 From: pacien Date: Sun, 5 Jan 2020 20:40:41 +0100 Subject: compiler: replace file filter with inclusino and exclusion glob lists GitHub: closes #16 --- compiler/package.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/package.yaml') diff --git a/compiler/package.yaml b/compiler/package.yaml index 18d8a33..0922c36 100644 --- a/compiler/package.yaml +++ b/compiler/package.yaml @@ -26,7 +26,7 @@ dependencies: - JuicyPixels - JuicyPixels-extra - parallel-io -- regex-compat +- Glob default-extensions: - DuplicateRecordFields -- cgit v1.2.3 From c8dea48bb4a0ec137bafba3bec79352eae2f48c0 Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 6 Jan 2020 00:01:53 +0100 Subject: compiler: default item date to filesystem last mod date GitHub: closes #14 --- compiler/package.yaml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compiler/package.yaml') diff --git a/compiler/package.yaml b/compiler/package.yaml index 0922c36..fd44ccc 100644 --- a/compiler/package.yaml +++ b/compiler/package.yaml @@ -27,6 +27,8 @@ dependencies: - JuicyPixels-extra - parallel-io - Glob +- safe +- time >= 1.9.3 && < 1.10 default-extensions: - DuplicateRecordFields -- cgit v1.2.3 From 03d39102ba55cda7cbe80fcdeb9b250caaa70bd0 Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 6 Jan 2020 10:28:27 +0100 Subject: compiler: properly reject invalid dates in sidecar files GitHub: closes #31 --- compiler/package.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/package.yaml') diff --git a/compiler/package.yaml b/compiler/package.yaml index fd44ccc..043985d 100644 --- a/compiler/package.yaml +++ b/compiler/package.yaml @@ -28,7 +28,7 @@ dependencies: - parallel-io - Glob - safe -- time >= 1.9.3 && < 1.10 +- time default-extensions: - DuplicateRecordFields -- cgit v1.2.3