1import Prelude hiding (putStr, getContents)
3import Data.Aeson (encode, Value)
4import Data.ByteString (getContents)
5import Data.ByteString.Lazy (putStr)
6import System.Environment (getArgs)
9import Data.Yaml (decodeFileEither, decodeEither')
12helpMessage = putStrLn "yaml2json FILE\n use - as FILE to indicate stdin" >> exitFailure
14showJSON :: Show a => Either a Value -> IO b
17 Left err -> print err >> exitFailure
18 Right res -> putStr (encode (res :: Value)) >> exitSuccess
24 -- strict getContents will read in all of stdin at once
25 (["-"]) -> getContents >>= showJSON . decodeEither'
26 ([f]) -> decodeFileEither f >>= showJSON
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list