Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Przemyslaw Kaminski
haskell-gargantext
Commits
c8b833cf
Commit
c8b833cf
authored
Sep 04, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] missing file.
parent
bfc34bb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
0 deletions
+54
-0
Main.hs
bin/gargantext-init/Main.hs
+54
-0
No files found.
bin/gargantext-init/Main.hs
0 → 100644
View file @
c8b833cf
{-|
Module : Main.hs
Description : Gargantext Import Corpus
Copyright : (c) CNRS, 2017-Present
License : AGPL + CECILL v3
Maintainer : team@gargantext.org
Stability : experimental
Portability : POSIX
Import a corpus binary.
-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE Strict #-}
module
Main
where
import
System.Environment
(
getArgs
)
import
Gargantext.Prelude
import
Gargantext.Database.Flow
(
FlowCmdM
,
flowCorpusFile
,
getOrMkRoot
)
import
Gargantext.Text.Corpus.Parsers
(
FileFormat
(
..
))
import
Gargantext.Database.Utils
(
Cmd
,
)
import
Gargantext.Database.Types.Node
(
CorpusId
,
toHyperdataDocument
,
RootId
)
import
Gargantext.Database.Schema.User
(
insertUsersDemo
,
UserId
)
import
Gargantext.Text.Terms
(
TermType
(
..
))
import
Gargantext.Core
(
Lang
(
..
))
import
Gargantext.API
-- (GargError)
import
Gargantext.API.Node
()
-- instances
import
Gargantext.API.Settings
(
withDevEnv
,
runCmdDev
,
DevEnv
)
--import Gargantext.Text.Corpus.Parsers.GrandDebat (readFile, GrandDebatReference(..))
import
Data.Text
(
Text
)
import
qualified
Data.Text
as
Text
import
Control.Monad.IO.Class
(
liftIO
)
main
::
IO
()
main
=
do
[
iniPath
]
<-
getArgs
let
createUsers
::
Cmd
GargError
Int64
createUsers
=
insertUsersDemo
let
mkRoots
::
Cmd
GargError
(
UserId
,
RootId
)
mkRoots
=
getOrMkRoot
"user1"
withDevEnv
iniPath
$
\
env
->
do
_
<-
runCmdDev
env
createUsers
_
<-
runCmdDev
env
mkRoots
pure
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment