Commit e93236e8 authored by Alexandre Delanoë's avatar Alexandre Delanoë

Merge branch 'dev-doc-annotation-issue' into dev-textflow

parents edaf2b40 cc55c48b
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:
- Gargantext.API.HashedResponse
- Gargantext.API.Node
- Gargantext.API.Node.File
- Gargantext.API.Ngrams
- Gargantext.API.Admin.Settings
- Gargantext.API.Prelude
- Gargantext.Core
......@@ -377,6 +378,22 @@ executables:
- gargantext
- 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:
garg-test:
......
......@@ -180,13 +180,13 @@ repoDir :: FilePath
repoDir = "repos"
repoSnapshot :: FilePath
repoSnapshot = repoDir <> "/repo.json"
repoSnapshot = repoDir <> "/repo.cbor"
-- | TODO add hard coded file in Settings
-- This assumes we own the lock on repoSnapshot.
repoSaverAction :: Serialise a => a -> IO ()
repoSaverAction a = do
withTempFile "repos" "tmp-repo.json" $ \fp h -> do
withTempFile "repos" "tmp-repo.cbor" $ \fp h -> do
printDebug "repoSaverAction" fp
L.hPut h $ serialise a
hClose h
......
......@@ -152,12 +152,6 @@ selectGroup cId aId q = proc () -> do
returnA -< FacetPaired a b c d
queryContactViaDoc :: O.Query ( NodeSearchRead
, ( NodeNodeReadNull
, ( NodeNodeReadNull
......
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