
{-| Common parsers for the CLI. -}

module CLI.Parsers where

import Prelude
import Gargantext.Core.Config.Types (SettingsFile(..))
import Options.Applicative

settings_p :: Parser SettingsFile
settings_p = maybe (SettingsFile "gargantext-settings.toml") SettingsFile <$>
  optional ( strOption ( long "settings-path"
                    <> short 'c'
                    <> metavar "FILEPATH"
                    <> value "gargantext-settings.toml"
                    <> showDefault
                    <> help "Location of the gargantext-settings.toml file"
                    ) )
