diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-03-01 15:03:23 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-03-01 15:03:23 +0100 |
commit | 5f433ad64700907de155ed1e5155193f28f93576 (patch) | |
tree | 009a98fca22df62db40020638c923fb22066c3a2 /tprint | |
parent | 4e434b328a0f6ddb0dc4ee333aa3135c1b271bf9 (diff) | |
download | thermoprint-5f433ad64700907de155ed1e5155193f28f93576.tar thermoprint-5f433ad64700907de155ed1e5155193f28f93576.tar.gz thermoprint-5f433ad64700907de155ed1e5155193f28f93576.tar.bz2 thermoprint-5f433ad64700907de155ed1e5155193f28f93576.tar.xz thermoprint-5f433ad64700907de155ed1e5155193f28f93576.zip |
More consistent formats & accurate documentation
Diffstat (limited to 'tprint')
-rw-r--r-- | tprint/src/Options.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tprint/src/Options.hs b/tprint/src/Options.hs index ca5ee2b..1ad6c47 100644 --- a/tprint/src/Options.hs +++ b/tprint/src/Options.hs | |||
@@ -83,7 +83,7 @@ data Sink = Stdout | WriteFile FilePath | |||
83 | 83 | ||
84 | supportedInputs, supportedOutputs :: [Format] | 84 | supportedInputs, supportedOutputs :: [Format] |
85 | supportedInputs = [BBCode, JSON] | 85 | supportedInputs = [BBCode, JSON] |
86 | supportedOutputs = [Human, Internal, JSON] | 86 | supportedOutputs = [Human, BBCode, Internal, JSON] |
87 | 87 | ||
88 | cmdPrinters, cmdJobs, cmdJobCreate, cmdJob, cmdJobStatus, cmdJobDelete, cmdDrafts, cmdDraftCreate, cmdDraftReplace, cmdDraft, cmdDraftDelete, cmdDraftPrint :: ParserInfo Operation | 88 | cmdPrinters, cmdJobs, cmdJobCreate, cmdJob, cmdJobStatus, cmdJobDelete, cmdDrafts, cmdDraftCreate, cmdDraftReplace, cmdDraft, cmdDraftDelete, cmdDraftPrint :: ParserInfo Operation |
89 | cmdPrinters = info cmdPrinters' $ progDesc "List all available printers" | 89 | cmdPrinters = info cmdPrinters' $ progDesc "List all available printers" |
@@ -157,7 +157,7 @@ pTPrint = TPrint <$> option (eitherReader parseBaseUrl) (metavar "URL" <> long " | |||
157 | pOutput :: Parser Output | 157 | pOutput :: Parser Output |
158 | pOutput = (,) <$> pOutputFormat <*> pSink | 158 | pOutput = (,) <$> pOutputFormat <*> pSink |
159 | where | 159 | where |
160 | pOutputFormat = option rCI $ metavar "FORMAT" <> long "output-format" <> short 'O' <> help ("Format to use for all output (possible values: " ++ show supportedOutputs ++ ")") <> value (head supportedOutputs) <> showDefault | 160 | pOutputFormat = option rCI $ metavar "FORMAT" <> long "output-format" <> short 'O' <> help ("Format to use for all output (possible values: " ++ show supportedOutputs ++ ")\nNo guarantees are made whether a format works for any given subcommand, unsupported formats are silently replaced with variations on the theme of `Human'") <> value (head supportedOutputs) <> showDefault |
161 | pSink = option rSink $ metavar "PATH" <> long "output" <> short 'o' <> help "Send output to PATH (`-' means stdout)" <> value Stdout <> showDefault | 161 | pSink = option rSink $ metavar "PATH" <> long "output" <> short 'o' <> help "Send output to PATH (`-' means stdout)" <> value Stdout <> showDefault |
162 | rSink = rSink' <$> str | 162 | rSink = rSink' <$> str |
163 | where | 163 | where |