diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-05-04 21:53:06 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-05-04 21:53:06 -0700 |
commit | f63129040b7d9d32366b92c8c435bee52b66d3a7 (patch) | |
tree | afdbc5d37b4d3f86e21d38f48c9c32bed57b4c02 | |
parent | 008273ef67ee846ad20ada6502d17b7c521e8630 (diff) | |
download | pandoc-f63129040b7d9d32366b92c8c435bee52b66d3a7.tar.gz |
Less verbose output from --self-contained.
Now one gets "Fetching [URL]..." for each URL fetched, but not
the full header.
-rw-r--r-- | src/Text/Pandoc/Shared.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index 39cc386e8..aa33c11f6 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -568,7 +568,8 @@ fetchItem sourceDir s = -- | Read from a URL and return raw data and maybe mime type. openURL :: String -> IO (B.ByteString, Maybe String) openURL u = getBodyAndMimeType `fmap` browse - (do setOutHandler (UTF8.hPutStrLn stderr) + (do S.liftIO $ UTF8.hPutStrLn stderr $ "Fetching " ++ u ++ "..." + setOutHandler $ const (return ()) setAllowRedirects True request (getRequest' u')) where getBodyAndMimeType (_, r) = (rspBody r, findHeader HdrContentType r) |