[Haskell-beginners] Converting wiki pages into pdf
mukeshtiwari.iiitm at gmail.com
Thu Sep 8 14:33:34 CEST 2011
I am trying to write a Haskell program which download html pages from
wikipedia including images and convert them into pdf . I wrote a small
main = do
x <- getLine
htmlpage <- getResponseBody =<< simpleHTTP ( getRequest x ) --open
--print.words $ htmlpage
let ind_1 = fromJust . ( \n -> findIndex ( n `isPrefixOf`) . tails $
htmlpage ) $ "<!-- content -->"
ind_2 = fromJust . ( \n -> findIndex ( n `isPrefixOf`) . tails $
htmlpage ) $ "<!-- /content -->"
tmphtml = drop ind_1 $ take ind_2 htmlpage
writeFile "down.html" tmphtml
and its working fine except some symbols are not rendering as it should be.
Could some one please suggest me how to accomplish this task.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners