diff --git a/make-pages/Main.hs b/make-pages/Main.hs index 2f7d462..0356a85 100644 --- a/make-pages/Main.hs +++ b/make-pages/Main.hs @@ -1,4 +1,14 @@ module Main (main) where +import System.Environment (getArgs) +import qualified Data.ByteString.Lazy as ByteString +import qualified Data.YAML as YAML +import qualified Data.Text.Lazy.IO as Text +import ImagePage + main :: IO () -main = error "undefined: 'main' in Main.hs" +main = do + [file] <- getArgs + txt <- ByteString.readFile file + let Right info = YAML.decode1 txt + Text.putStr $ make info diff --git a/make-pages/make-pages.cabal b/make-pages/make-pages.cabal index 96fcd95..7893cfa 100644 --- a/make-pages/make-pages.cabal +++ b/make-pages/make-pages.cabal @@ -21,6 +21,7 @@ executable make-pages base ^>= 4.12.0.0, containers ^>= 0.6.0.1, time ^>= 1.8.0.2, + bytestring ^>= 0.10.8.2, text ^>= 1.2.3.1, vector ^>= 0.12.1.2, HsYAML ^>= 0.2.1.0