Is it possible to automate this process rather than manually clicking and downloading using Haskell ?<div><br></div><div>Thank You<br>Mukesh Tiwari</div><div><br><div class="gmail_quote">On Thu, Sep 8, 2011 at 6:11 PM, Max Rabkin <span dir="ltr"><<a href="mailto:max.rabkin@gmail.com">max.rabkin@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">This doesn't answer your Haskell question, but Wikpedia has<br>
PDF-generation facilities ("Books"). Take a look at<br>
<a href="http://en.wikipedia.org/wiki/Help:Book" target="_blank">http://en.wikipedia.org/wiki/Help:Book</a> (for single articles, just use<br>
the "download PDF" option in the sidebar).<br>
<br>
--Max<br>
<br>
On Thu, Sep 8, 2011 at 14:34, mukesh tiwari<br>
<<a href="mailto:mukeshtiwari.iiitm@gmail.com">mukeshtiwari.iiitm@gmail.com</a>> wrote:<br>
> Hello all<br>
> I am trying to write a Haskell program which download html pages from<br>
> wikipedia including images and convert them into pdf . I wrote a<br>
> small script<br>
><br>
> import Network.HTTP<br>
> import Data.Maybe<br>
> import Data.List<br>
><br>
> main = do<br>
> x <- getLine<br>
> htmlpage <- getResponseBody =<< simpleHTTP ( getRequest x ) --<br>
> open url<br>
> --print.words $ htmlpage<br>
> let ind_1 = fromJust . ( \n -> findIndex ( n `isPrefixOf`) .<br>
> tails $ htmlpage ) $ "<!-- content -->"<br>
> ind_2 = fromJust . ( \n -> findIndex ( n `isPrefixOf`) .<br>
> tails $ htmlpage ) $ "<!-- /content -->"<br>
> tmphtml = drop ind_1 $ take ind_2 htmlpage<br>
> writeFile "down.html" tmphtml<br>
><br>
> and its working fine except some symbols are not rendering as it<br>
> should be. Could some one please suggest me how to accomplish this<br>
> task.<br>
><br>
> Thank you<br>
> Mukesh Tiwari<br>
><br>
> _______________________________________________<br>
> Haskell-Cafe mailing list<br>
> <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
> <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
><br>
</blockquote></div><br></div>