1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
name: download-curl
version: 0.1.4
homepage: http://code.haskell.org/~dons/code/download-curl
synopsis: High-level file download based on URLs
description: High-level file download based on URLs
.
Download web content as strict or lazy bytestringrs, strings, HTML
tags, XML, RSS or Atom feeds or JSON, using the curl network library.
.
Importing the library:
.
> import Network.Curl.Download
.
Loading a webpage as a "ByteString":
.
> doc <- openURI "http://haskell.org"
.
Loading from a file:
.
> doc <- openURI "file:///tmp/A.hs"
.
Loading a HTML page as a list of tags:
.
> tags <- openAsTags "http://haskell.org"
.
Loading a HTML page as XML:
.
> tags <- openAsXML "http://haskell.org"
.
Loading an RSS or Atom feed:
.
> feed <- openAsFeed "http://haskell.org"
.
These data types can the be processed further with the XML, Feed and
TagSoup libraries.
.
category: Network
license: BSD3
license-file: LICENSE
copyright: (c) 2008, Don Stewart <dons@galois.com>
author: Don Stewart
maintainer: Don Stewart <dons@galois.com>
cabal-version: >= 1.2.0
build-type: Simple
tested-with: GHC ==6.8.2
flag small_base
description: Build with new smaller base library
library
exposed-modules: Network.Curl.Download
Network.Curl.Download.Lazy
ghc-options: -Wall -fno-warn-unused-do-bind
if flag(small_base)
build-depends: base >= 3 && < 6, bytestring
else
build-depends: base > 3 && < 4
build-depends: curl, tagsoup >= 0.8 && < 0.14, feed, xml
|