diff options
| -rw-r--r-- | tprint/src/Main.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tprint/src/Main.hs b/tprint/src/Main.hs index 5b26bfe..6df335a 100644 --- a/tprint/src/Main.hs +++ b/tprint/src/Main.hs | |||
| @@ -77,6 +77,12 @@ tprint TPrint{ operation = Drafts, ..} Client{..} out = drafts >>= format | |||
| 77 | | (Human, _) <- output = mapM_ (\(DraftId n, fromMaybe "" . fmap T.unpack -> t) -> hPutStrLn out $ show n ++ "\t" ++ t) $ Map.toAscList ds | 77 | | (Human, _) <- output = mapM_ (\(DraftId n, fromMaybe "" . fmap T.unpack -> t) -> hPutStrLn out $ show n ++ "\t" ++ t) $ Map.toAscList ds |
| 78 | | (JSON, _) <- output = LCBS.hPutStrLn out $ encodePretty ds | 78 | | (JSON, _) <- output = LCBS.hPutStrLn out $ encodePretty ds |
| 79 | | otherwise = hPutStrLn out . dumpStr $ Map.toAscList ds | 79 | | otherwise = hPutStrLn out . dumpStr $ Map.toAscList ds |
| 80 | |||
| 81 | tprint TPrint{ operation = JobStatus{..}, ..} Client{..} out = jobStatus jobId >>= format | ||
| 82 | where format s | ||
| 83 | | (Human, _) <- output = hPutStrLn out $ humanJobStatus s Nothing | ||
| 84 | | (JSON, _) <- output = LCBS.hPutStrLn out $ encodePretty s | ||
| 85 | | otherwise = hPutStrLn out $ dumpStr s | ||
| 80 | 86 | ||
| 81 | tprint TPrint{ operation = Job{..}, ..} Client{..} out = job jobId >>= format | 87 | tprint TPrint{ operation = Job{..}, ..} Client{..} out = job jobId >>= format |
| 82 | where format p | 88 | where format p |
