]> gitweb.michael.orlitzky.com - dead/lwn-epub.git/blobdiff - src/Main.hs
Begin work on the full page code.
[dead/lwn-epub.git] / src / Main.hs
index a3728d289004783a09045ab739ea8a30edbd22b7..37f89674eacbc115050f65f717a6bbe8530ddf71 100644 (file)
@@ -1,18 +1,25 @@
+{-# LANGUAGE ScopedTypeVariables #-}
 module Main
 where
 
 import Data.Maybe (fromJust)
 import Text.HandsomeSoup (parseHtml)
-import System.Time (ClockTime( TOD ), getClockTime)
 
 import Epublishable
 import LWN.ArticlePage
+import LWN.FullPage
+import XHTML
 
 main :: IO ()
 main = do
   article_html <- readFile "test/fixtures/501317-article.html"
   ioap <- parse $ parseHtml article_html
   let article_page :: ArticlePage = fromJust $ ioap
-  (TOD t _) <- getClockTime 
-  epublish article_page "out.epub" t
+  epublish article_page "single_article.epub"
+
+  page_html <- readFile "test/fixtures/500848-page.html"
+  ioap_f <- parse $ parseHtml page_html
+  let full_page :: FullPage = fromJust $ ioap_f
+  --putStrLn $ to_xhtml full_page
+  --epublish full_page "full_page.epub"
   putStrLn "Done."