1 {-# LANGUAGE ScopedTypeVariables, RecordWildCards #-}
5 import Data.Maybe (fromJust)
6 import System.Console.CmdArgs (cmdArgsRun)
8 import Text.XML.HXT.Core
11 import CommandLine (Args(..), apply_args)
13 import LWN.ArticlePage
16 my_read :: String -> IOStateArrow s b XmlTree
18 readDocument [ withValidate no,
20 withInputEncoding utf8,
25 Args{..} <- apply_args
28 -- let article_html = my_read "test/fixtures/501317-article.html"
29 -- ioap <- parse article_html
30 -- let article_page :: ArticlePage = fromJust $ ioap
31 -- epublish article_page "single_article.epub"
33 -- let page_html = my_read "test/fixtures/500848-page.html"
34 -- ioap_f <- parse page_html
35 -- let full_page :: FullPage = fromJust $ ioap_f
36 -- epublish full_page "full_page.epub"
38 -- let bigpage_html = my_read "test/fixtures/50844-bigpage.html"
39 -- ioap_bp <- parse bigpage_html
40 -- let bigpage :: FullPage = fromJust $ ioap_bp
41 -- epublish bigpage "bigpage.epub"