a3728d289004783a09045ab739ea8a30edbd22b7
[dead/lwn-epub.git] / src / Main.hs
1 module Main
2 where
3
4 import Data.Maybe (fromJust)
5 import Text.HandsomeSoup (parseHtml)
6 import System.Time (ClockTime( TOD ), getClockTime)
7
8 import Epublishable
9 import LWN.ArticlePage
10
11 main :: IO ()
12 main = do
13 article_html <- readFile "test/fixtures/501317-article.html"
14 ioap <- parse $ parseHtml article_html
15 let article_page :: ArticlePage = fromJust $ ioap
16 (TOD t _) <- getClockTime
17 epublish article_page "out.epub" t
18 putStrLn "Done."