diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2017-10-16 15:16:56 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2017-10-16 15:17:18 +0200 |
commit | 25379bbdcc51e0ccd243d3391fa6bc266cd314e2 (patch) | |
tree | bdf4fcfbf0a5485ecde15ed2dd410974f2c630a7 /src/Main.hs | |
parent | 5703498008563418c4407c1608cd8cac933f96c0 (diff) | |
download | comatose-25379bbdcc51e0ccd243d3391fa6bc266cd314e2.tar.gz comatose-25379bbdcc51e0ccd243d3391fa6bc266cd314e2.tar.bz2 comatose-25379bbdcc51e0ccd243d3391fa6bc266cd314e2.zip |
Split Main.hs
Replace tabs with spaces. No functional changes.
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 23 |
1 files changed, 23 insertions, 0 deletions
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" + |