import System.IO (
Handle,
IOMode (WriteMode),
+ hPutStrLn,
openBinaryFile,
- stdout)
+ stderr,
+ stdout
+ )
import CommandLine (show_help)
import Configuration (Cfg(..), get_cfg)
cfg <- case aif of
False -> get_login_cookie cfg'
True -> return cfg'
+
page <- page_from_url cfg (article cfg)
case page of
Just p -> do
output_handle <- get_output_handle (output cfg)
epublish p output_handle
Nothing -> do
+ hPutStrLn stderr "ERROR: could not parse an LWN page from the given URL."
_ <- show_help
return ()