X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Flwn-epub.git;a=blobdiff_plain;f=src%2FMain.hs;h=37f89674eacbc115050f65f717a6bbe8530ddf71;hp=a3728d289004783a09045ab739ea8a30edbd22b7;hb=5cb0170a5ab418147e3403fb141797f2282b78f4;hpb=b591d5f5c3c47d253c24144beae1edf8648cd94b diff --git a/src/Main.hs b/src/Main.hs index a3728d2..37f8967 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -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."