Commit 8484ca0f authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] cbor2json

parent 8b7790c2
import Prelude (IO, id, (.))
import System.Environment (getArgs)
import Prelude (IO, id, (.), ($))
import Data.Aeson (encode) import Data.Aeson (encode)
import Codec.Serialise (deserialise) import Codec.Serialise (deserialise)
import qualified Data.ByteString.Lazy as L import qualified Data.ByteString.Lazy as L
import Gargantext.Core.NodeStory (NodeListStory)
import Gargantext.API.Ngrams.Types (NgramsRepo)
main :: IO () main :: IO ()
main = L.interact (encode . (id :: NgramsRepo -> NgramsRepo) . deserialise) main = do
[inFile,outFile] <- getArgs
inData <- L.readFile inFile
let outData = (encode . (id :: NodeListStory -> NodeListStory) . deserialise) inData
L.writeFile outData
...@@ -400,22 +400,22 @@ executables: ...@@ -400,22 +400,22 @@ executables:
- base - base
# gargantext-cbor2json: gargantext-cbor2json:
# main: Main.hs main: Main.hs
# source-dirs: bin/gargantext-cbor2json source-dirs: bin/gargantext-cbor2json
# ghc-options: ghc-options:
# - -threaded - -threaded
# - -rtsopts - -rtsopts
# - -with-rtsopts=-N - -with-rtsopts=-N
# - -O2 - -O2
# - -Wmissing-signatures - -Wmissing-signatures
# dependencies: dependencies:
# - gargantext - gargantext
# - gargantext-prelude - gargantext-prelude
# - base - base
# - bytestring - bytestring
# - aeson - aeson
# - serialise - serialise
tests: tests:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment