Commit 474c1abe authored by Nicolas Pouillard's avatar Nicolas Pouillard

Add gargantext-cbor2json: STDIN is CBOR, STDOUT is JSON

parent d9e09553
import Prelude (IO, id, (.))
import Codec.Serialise (deserialise)
import Data.Aeson (encode)
import qualified Data.ByteString.Lazy as L
import Gargantext.API.Ngrams (NgramsRepo)
main :: IO ()
main = L.interact (encode . (id :: NgramsRepo -> NgramsRepo) . deserialise)
...@@ -41,6 +41,7 @@ library: ...@@ -41,6 +41,7 @@ library:
- Gargantext.API.HashedResponse - Gargantext.API.HashedResponse
- Gargantext.API.Node - Gargantext.API.Node
- Gargantext.API.Node.File - Gargantext.API.Node.File
- Gargantext.API.Ngrams
- Gargantext.API.Admin.Settings - Gargantext.API.Admin.Settings
- Gargantext.API.Prelude - Gargantext.API.Prelude
- Gargantext.Core - Gargantext.Core
...@@ -377,6 +378,22 @@ executables: ...@@ -377,6 +378,22 @@ executables:
- gargantext - gargantext
- base - base
gargantext-cbor2json:
main: Main.hs
source-dirs: bin/gargantext-cbor2json
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
- -O2
- -Wmissing-signatures
dependencies:
- gargantext
- base
- bytestring
- aeson
- serialise
tests: tests:
garg-test: garg-test:
......
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