Remove offline mode since it' not implemented yet
parent
d465f223ef
commit
bfd3ad7535
|
@ -15,8 +15,7 @@ import Options.Applicative
|
||||||
|
|
||||||
-- TODO: add debug
|
-- TODO: add debug
|
||||||
data Options = Options
|
data Options = Options
|
||||||
{ offline :: Bool
|
{ noAnsi :: Bool
|
||||||
, noAnsi :: Bool
|
|
||||||
, columns :: Maybe Integer
|
, columns :: Maybe Integer
|
||||||
, choice :: Choice
|
, choice :: Choice
|
||||||
}
|
}
|
||||||
|
@ -24,8 +23,7 @@ data Options = Options
|
||||||
|
|
||||||
optsParser :: Parser Options
|
optsParser :: Parser Options
|
||||||
optsParser =
|
optsParser =
|
||||||
Options <$> switch (long "offline" <> short 'N' <> help "only access cache")
|
Options <$> switch (long "no-ansi" <> short 'A' <> help "disable ANSI codes")
|
||||||
<*> switch (long "no-ansi" <> short 'A' <> help "disable ANSI codes")
|
|
||||||
<*> (Just <$> option auto (metavar "COLUMNS_NUMBER" <> long "columns" <> short 'c' <> help "number of columns")
|
<*> (Just <$> option auto (metavar "COLUMNS_NUMBER" <> long "columns" <> short 'c' <> help "number of columns")
|
||||||
<|> pure Nothing)
|
<|> pure Nothing)
|
||||||
<*> choiceParser
|
<*> choiceParser
|
||||||
|
|
|
@ -57,9 +57,7 @@ program GetTopic{topic_id} = do
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = do
|
main = do
|
||||||
Options{offline, noAnsi, choice} <- getOpts
|
Options{noAnsi, choice} <- getOpts
|
||||||
when offline do
|
|
||||||
error "Offline mode is not yet implemented"
|
|
||||||
manager' <- newManager $
|
manager' <- newManager $
|
||||||
defaultManagerSettings
|
defaultManagerSettings
|
||||||
& (managerSetProxy $ proxyEnvironmentNamed "I2P_HTTP_PROXY" $ Just defProxy)
|
& (managerSetProxy $ proxyEnvironmentNamed "I2P_HTTP_PROXY" $ Just defProxy)
|
||||||
|
|
Loading…
Reference in New Issue