1import Control.Monad (when)
2import qualified Data.Aeson as J
3import qualified Data.ByteString as S
4import qualified Data.ByteString.Lazy as L
5import System.Environment (getArgs)
7import qualified Data.Yaml as Y
12 when (length args > 2) $ error "Usage: json2yaml [in] [out]"
13 let (input:output:_) = args ++ repeat "-"
14 mval <- fmap J.decode $
19 Nothing -> error "Invalid input JSON"
20 Just val -> case output of
21 "-" -> S.putStr $ Y.encode (val :: Y.Value)
22 _ -> Y.encodeFile output val
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