From 25379bbdcc51e0ccd243d3391fa6bc266cd314e2 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Mon, 16 Oct 2017 15:16:56 +0200 Subject: Split Main.hs Replace tabs with spaces. No functional changes. --- src/Main.hs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/Main.hs (limited to 'src/Main.hs') diff --git a/src/Main.hs b/src/Main.hs new file mode 100644 index 0000000..1521382 --- /dev/null +++ b/src/Main.hs @@ -0,0 +1,23 @@ +module Main (main) where + +import Text.ParserCombinators.Parsec.Prim +import Text.BibTeX.Parse +import System.Directory (copyFile) + +import Render (render) +import Db (readDb) + +import Paths_comatose + +-- |Read attributions from bibtex file +readAttributions = getDataFileName "data/attribution.bib" >>= parseFromFile file + +copyDataFile source dest = getDataFileName source >>= (\x -> copyFile x dest) + +main = do + db <- getDataFileName "data/db.yaml" >>= readDb + (Right attribution) <- readAttributions + render "_build/index.html" db attribution + copyDataFile "data/style.css" "_build/style.css" + copyDataFile "data/script.js" "_build/script.js" + -- cgit v1.2.3